forked from ginty/cranky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ginty#6 from beorc/create_collection
Ability to create collections of items
- Loading branch information
Showing
4 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,11 @@ | |
crank!(:user).saved?.should == true | ||
end | ||
|
||
it "does save each item in the collection when generated via create or crank!" do | ||
Factory.create(:users_collection).select { |u| !u.saved? }.should be_empty | ||
crank!(:users_collection).select { |u| !u.saved? }.should be_empty | ||
end | ||
|
||
it "allows all attributes to be overriden in the call" do | ||
u = Factory.build(:user, :name => "Indy", :email => "[email protected]", :role => :dog, :unique => :yep) | ||
u.name.should == "Indy" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters