diff options
Diffstat (limited to 'activesupport/test/core_ext/object')
-rw-r--r-- | activesupport/test/core_ext/object/try_test.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/activesupport/test/core_ext/object/try_test.rb b/activesupport/test/core_ext/object/try_test.rb index cdb76af1ac..5ea0f0eca6 100644 --- a/activesupport/test/core_ext/object/try_test.rb +++ b/activesupport/test/core_ext/object/try_test.rb @@ -77,9 +77,9 @@ class ObjectTryTest < ActiveSupport::TestCase klass = Class.new do private - def private_method - 'private method' - end + def private_method + 'private method' + end end assert_raise(NoMethodError) { klass.new.try!(:private_method) } @@ -89,9 +89,9 @@ class ObjectTryTest < ActiveSupport::TestCase klass = Class.new do private - def private_method - 'private method' - end + def private_method + 'private method' + end end assert_nil klass.new.try(:private_method) @@ -108,9 +108,9 @@ class ObjectTryTest < ActiveSupport::TestCase private - def private_delegator_method - 'private delegator method' - end + def private_delegator_method + 'private delegator method' + end end def test_try_with_method_on_delegator @@ -139,9 +139,9 @@ class ObjectTryTest < ActiveSupport::TestCase klass = Class.new do private - def private_method - 'private method' - end + def private_method + 'private method' + end end assert_nil Decorator.new(klass.new).try(:private_method) @@ -151,9 +151,9 @@ class ObjectTryTest < ActiveSupport::TestCase klass = Class.new do private - def private_method - 'private method' - end + def private_method + 'private method' + end end assert_raise(NoMethodError) do |