spec/hashme/base_spec.rb in hashme-0.1.1 vs spec/hashme/base_spec.rb in hashme-0.1.2

- old
+ new

@@ -30,9 +30,16 @@ it "should accept and set attributes" do @obj = @model.new(:name => "Sam") @obj.name.should eql("Sam") end + it "should set default values so they are accessible by hash" do + @model.property :surname, String, :default => "Nowl" + @obj = @model.new + @obj.to_hash[:surname].should eql('Nowl') + end + + end end