diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/ordered_options_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/test/ordered_options_test.rb b/activesupport/test/ordered_options_test.rb index c47e945c24..83a3e2e561 100644 --- a/activesupport/test/ordered_options_test.rb +++ b/activesupport/test/ordered_options_test.rb @@ -20,4 +20,18 @@ class OrderedOptionsTest < Test::Unit::TestCase assert_equal 2, a.size assert_equal 56, a[:else_where] end + + def test_looping + a = OrderedOptions.new + + a[:allow_concurreny] = true + a["else_where"] = 56 + + test = [[:allow_concurreny, true], [:else_where, 56]] + + a.each_with_index do |(key, value), index| + assert_equal test[index].first, key + assert_equal test[index].last, value + end + end end |