diff options
| author | mo khan <mo@mokhan.ca> | 2013-07-06 12:52:19 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-07-06 12:52:19 -0600 |
| commit | caec9e5aa7ebff836181fef20cbfb37e3dcfc1a8 (patch) | |
| tree | 9e38d3d8b2fd1a39fbd7958a4689695981f42cef | |
| parent | a7bf52af8871bc6b900b90e593b77e7b0f1de5af (diff) | |
fix broken spec
| -rw-r--r-- | spec/models/user_spec.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8221e4f3..3d93a7b8 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -117,23 +117,17 @@ describe User do end describe "when loading all the users" do - let(:first_person) { FactoryGirl.create(:user) } - let(:second_person) { FactoryGirl.create(:user) } - - before :each do - first_person - second_person - first_person.touch - end + let!(:first_person) { FactoryGirl.create(:user, :creations_count => 0) } + let!(:second_person) { FactoryGirl.create(:user, :creations_count => 1) } let(:results) { User.all } - it "should load the person who signed up first last" do - results[1].should == first_person + it "should load the person with the most cakes first" do + results[0].should == second_person end - it "should load the person who signed up next first" do - results[0].should == second_person + it "should load the person with the least cakes last" do + results[1].should == first_person end end |
