Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added test for looping in order

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit ab2a24de9d7858a08a6f364752297bb4f4cfa30d 1 parent 9f146ea
@dhh dhh authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 activesupport/test/ordered_options_test.rb
View
14 activesupport/test/ordered_options_test.rb
@@ -20,4 +20,18 @@ def test_usage
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
Please sign in to comment.
Something went wrong with that request. Please try again.