PageRenderTime 756ms CodeModel.GetById 7ms RepoModel.GetById 1ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/hash/test_swap.rb

https://bitbucket.org/mediashelf/fedora-migrator
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
  1. require 'facets/hash/swap.rb'
  2. require 'test/unit'
  3. class TestHashSwap < Test::Unit::TestCase
  4. def test_swap!
  5. h = { :a=>1, :b=>2 }
  6. assert_equal( { :a=>2, :b=>1 }, h.swap!(:a, :b) )
  7. end
  8. end