aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/ordered_options_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-05-05 00:34:13 -0700
committerJosé Valim <jose.valim@gmail.com>2012-05-05 00:34:13 -0700
commitd6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6 (patch)
tree6b16e0438bb5c0b2620c2b21fcbc652f510ca559 /activesupport/test/ordered_options_test.rb
parent2ce5e4fa6c6f44eb0c5cbf812ca62aa03b802379 (diff)
parent14762dc5effbc7bb9ae94cb5af895a9a33512867 (diff)
downloadrails-d6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6.tar.gz
rails-d6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6.tar.bz2
rails-d6e2c81cfe31a4c05adc50cd49fa265c5d3cd3e6.zip
Merge pull request #6169 from marcandre/respond_to_missing
Respond to missing
Diffstat (limited to 'activesupport/test/ordered_options_test.rb')
-rw-r--r--activesupport/test/ordered_options_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/ordered_options_test.rb b/activesupport/test/ordered_options_test.rb
index 3526c7a366..f60f9a58e3 100644
--- a/activesupport/test/ordered_options_test.rb
+++ b/activesupport/test/ordered_options_test.rb
@@ -77,4 +77,12 @@ class OrderedOptionsTest < ActiveSupport::TestCase
assert copy.kind_of?(original.class)
assert_not_equal copy.object_id, original.object_id
end
+
+ def test_introspection
+ a = ActiveSupport::OrderedOptions.new
+ assert a.respond_to?(:blah)
+ assert a.respond_to?(:blah=)
+ assert_equal 42, a.method(:blah=).call(42)
+ assert_equal 42, a.method(:blah).call
+ end
end