README.markdown in sham-1.2.0 vs README.markdown in sham-2.0.0
- old
+ new
@@ -47,11 +47,11 @@
Sham can also create objects without automatically saving using the `:build`
option.
user = User.sham!(:build, :name => "I have not been saved")
- user.save
+ user.save!
## RSpec Example
The following is an example of an RSpec test for `ActiveRecord` validations.
@@ -152,14 +152,14 @@
{ :name => 'John Doe' }
end
end
When executing `User.sham!` all attributes will be assigned using the instance
-setters instead of the initializer. A `save` will also be called unless the
+setters instead of the initializer. A `save!` will also be called unless the
`:build` parameters is used.
User.any_instance.should_receive(:name=).with('Jane Doe')
- User.any_instance.should_receive(:save)
+ User.any_instance.should_receive(:save!)
User.sham!(:name => 'Jane Doe')
## Empty Shams
Sometimes you simply want to be able to sham an object without passing any