README.markdown in sham-0.2.0 vs README.markdown in sham-0.3.0
- old
+ new
@@ -56,16 +56,16 @@
end
# in spec/models/item_spec.rb
describe Item do
it "should not allow items with a negative price" do
- item = Item.sham :build, :quantity => -1
+ item = Item.sham! :build, :quantity => -1
item.valid?.should be_false
end
it "should allow items with a positive quantity" do
- item = Item.sham :build, :quantity => 10
+ item = Item.sham! :build, :quantity => 10
item.valid?.should be_true
end
end
## Shamming Alternatives
@@ -100,6 +100,6 @@
end
The nested shams will automatically be invoked and can be overridden during a sham:
LineItem.sham!
- LineItem.sham! :item => Item.sham!(:weight => 100)
\ No newline at end of file
+ LineItem.sham! :item => Item.sham!(:weight => 100)