/vendor/gems/facets-2.4.5/test/core/hash/test_swap.rb
Ruby | 11 lines | 8 code | 3 blank | 0 comment | 0 complexity | a852794dbcde12ded7fce9f40a0657dc MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
- require 'facets/hash/swap.rb'
- require 'test/unit'
- class TestHashSwap < Test::Unit::TestCase
- def test_swap!
- h = { :a=>1, :b=>2 }
- assert_equal( { :a=>2, :b=>1 }, h.swap!(:a, :b) )
- end
- end