From 83b0204138a178d0e24e3d9aec454dd283a5185e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 10 Dec 2007 05:12:50 +0000 Subject: Ruby 1.9 compat. References #1689 [Pratik Naik] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/class/delegating_attributes_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/test/core_ext/class') diff --git a/activesupport/test/core_ext/class/delegating_attributes_test.rb b/activesupport/test/core_ext/class/delegating_attributes_test.rb index 59c0a6f63c..f5b14364cf 100644 --- a/activesupport/test/core_ext/class/delegating_attributes_test.rb +++ b/activesupport/test/core_ext/class/delegating_attributes_test.rb @@ -25,7 +25,7 @@ class DelegatingAttributesTest < Test::Unit::TestCase # The class and instance should have an accessor, but there # should be no mutator assert single_class.respond_to?(:only_reader) - assert single_class.public_instance_methods.include?("only_reader") + assert single_class.public_instance_methods.map(&:to_s).include?("only_reader") assert !single_class.respond_to?(:only_reader=) end @@ -45,8 +45,8 @@ class DelegatingAttributesTest < Test::Unit::TestCase # the instance should have an accessor only assert single_class.respond_to?(:both) assert single_class.respond_to?(:both=) - assert single_class.public_instance_methods.include?("both") - assert !single_class.public_instance_methods.include?("both=") + assert single_class.public_instance_methods.map(&:to_s).include?("both") + assert !single_class.public_instance_methods.map(&:to_s).include?("both=") end def test_working_with_simple_attributes -- cgit v1.2.3