aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/ordered_options_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/activesupport/test/ordered_options_test.rb b/activesupport/test/ordered_options_test.rb
index 83a3e2e561..0247331c6a 100644
--- a/activesupport/test/ordered_options_test.rb
+++ b/activesupport/test/ordered_options_test.rb
@@ -34,4 +34,22 @@ class OrderedOptionsTest < Test::Unit::TestCase
assert_equal test[index].last, value
end
end
+
+ def test_method_access
+ a = OrderedOptions.new
+
+ assert_nil a.not_set
+
+ a.allow_concurreny = true
+ assert_equal 1, a.size
+ assert a.allow_concurreny
+
+ a.allow_concurreny = false
+ assert_equal 1, a.size
+ assert !a.allow_concurreny
+
+ a.else_where = 56
+ assert_equal 2, a.size
+ assert_equal 56, a.else_where
+ end
end