spec/model_spec.rb in blendris-0.0.3 vs spec/model_spec.rb in blendris-0.0.4
- old
+ new
@@ -19,9 +19,14 @@
@onion.category = @vegetable
@onion.category.name.should == "vegetable"
end
+ it "should not allow its key values to be changed" do
+ lambda { @onion.name = "asdf" }.should raise_exception(BlendrisCannotSetKeyValue)
+ lambda { @onion.description = "asdf" }.should_not raise_exception
+ end
+
it "should have a valid reference set" do
@fruit.foods.count.should == 0
@fruit.foods << [ @apple, @lemon ]