Sha256: 56629c257141d7007650c78f2bcb060b6fbd10d713543ef6628777c8eba1f8bc
Contents?: true
Size: 393 Bytes
Versions: 4
Compression:
Stored size: 393 Bytes
Contents
require 'spec_helper' require 'music/patches/hash' describe Hash do describe '#flip' do it "Should reverse keys and values" do {1 => 2, 3 => 4}.flip.should == {2 => 1, 4 => 3} {'foo' => 'bar', 'baz' => 'bitz'}.flip.should == {'bitz' => 'baz', 'bar' => 'foo'} end it "Should return an empty hash from an empty hash" do {}.flip.should == {} end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
music-0.6.2 | spec/classes/hash_spec.rb |
music-0.6.1 | spec/classes/hash_spec.rb |
music-0.5.1 | spec/classes/hash_spec.rb |
music-0.5.0 | spec/classes/hash_spec.rb |