Sha256: 8e45400771f6f6a8fbfd29506e4bcaefa1fd618885b691198a71f4e7e4777c0a
Contents?: true
Size: 527 Bytes
Versions: 88
Compression:
Stored size: 527 Bytes
Contents
require 'spec_helper' describe Hash do describe "to_dragonfly_unique_s" do it "should concatenate the to_s's of each of the elements, sorted alphabetically" do {'z' => nil, :a => 4, false => 'ice', 5 => 6.2}.to_dragonfly_unique_s.should == '56.2a4falseicez' end it "should nest correctly" do {:m => 1, :a => {:c => 2, :b => 3}, :z => 4}.to_dragonfly_unique_s.should == 'ab3c2m1z4' end it "should be empty if empty" do {}.to_dragonfly_unique_s.should == '' end end end
Version data entries
88 entries across 88 versions & 3 rubygems