diff options
Diffstat (limited to 'activesupport/test/core_ext/array_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/array_ext_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb index 8c5356ac78..6552ffcbd8 100644 --- a/activesupport/test/core_ext/array_ext_test.rb +++ b/activesupport/test/core_ext/array_ext_test.rb @@ -191,3 +191,12 @@ class ArrayToXmlTests < Test::Unit::TestCase assert xml.include?(%(<count>2</count>)), xml end end + +class ArrayExtractOptionsTests < Test::Unit::TestCase + def test_extract_options + assert_equal({}, [].extract_options!) + assert_equal({}, [1].extract_options!) + assert_equal({:a=>:b}, [{:a=>:b}].extract_options!) + assert_equal({:a=>:b}, [1, {:a=>:b}].extract_options!) + end +end |