diff --git a/lib/shoulda/context/context.rb b/lib/shoulda/context/context.rb index c15b2ffc..ce1dc1fa 100644 --- a/lib/shoulda/context/context.rb +++ b/lib/shoulda/context/context.rb @@ -100,7 +100,7 @@ def test_unit_class def test_methods @test_methods ||= Hash.new { |h,k| - h[k] = Hash[k.instance_methods.map { |n| [n, true] }] + h[k] = k.instance_methods.each_with_object({}) { |n, a| a[n] = true } } end @@ -213,4 +213,3 @@ def method_missing(method, *args, &blk) class DuplicateTestError < RuntimeError; end end end -