spec/hashme/property_spec.rb in hashme-0.2.5 vs spec/hashme/property_spec.rb in hashme-0.2.6

- old
+ new

@@ -34,9 +34,14 @@ it "should accept a default option" do prop = subject.new(:name, String, :default => "Freddo") expect(prop.default).to eql("Freddo") end + + it "should accept a default option from a Proc" do + prop = subject.new(:name, String, :default => -> { "Freddo" }) + expect(prop.default).to eql("Freddo") + end end describe "#to_s" do it "should use property's name" do prop = subject.new(:name, String)