Skip to content

Commit

Permalink
ruby-i18n#291 - added a test for the slice function with non-existent…
Browse files Browse the repository at this point in the history
… key
  • Loading branch information
brettcave committed Oct 1, 2014
1 parent 6e4ee1b commit 67350b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/core_ext/hash_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class I18nCoreExtHashInterpolationTest < I18n::TestCase
hash = { :foo => 'bar', :baz => 'bar' }
expected = { :foo => 'bar' }
assert_equal expected, hash.slice(:foo)

hash = { :foo => 'bar', :baz => 'bar')
expected = { :foo => 'bar', :baz => 'bar' }
assert_equal expected, hash.slice(:missing_key)
end

test "#except" do
Expand Down

0 comments on commit 67350b6

Please sign in to comment.