Sha256: 65555c35563e5cd24c904c8aebe40567076ed98e8ef0fcd18f3802dcfe3d2866
Contents?: true
Size: 430 Bytes
Versions: 2
Compression:
Stored size: 430 Bytes
Contents
require 'spec_helper' describe "hashifhy" do it "creates a hash with default value of true" do [1,2,3,4].hashify.should == {1=>true, 2=>true, 3=>true, 4=>true} end it "creates a hash with passed value" do [1,2,3,4].hashify("a").should == {1=>"a", 2=>"a", 3=>"a", 4=>"a"} end it "creates a hash with block value" do [1,2,3,4].hashify{|n| "a" * n}.should == {1=>"a", 2=>"aa", 3=>"aaa", 4=>"aaaa"} end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enumerable_hashify-0.0.2 | spec/hashify_spec.rb |
enumerable_hashify-0.0.1 | spec/hashify_spec.rb |