Created
July 13, 2011 00:26
-
-
Save danielvlopes/1079493 to your computer and use it in GitHub Desktop.
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
describe "users by activity" do | |
before do | |
# usar factory ou fixtures | |
# para criar users populares | |
# nessa linha, ex: | |
# @popular = Factory.create :popular_user | |
# @normal = Factory.create :user | |
# @abandoned = Factory.create :abandoned_user | |
@users = User.by_activity | |
end | |
it "returns a list with users" do | |
@users.should_not be_empty | |
end | |
it 'returns users sorted by activity' do | |
@users.should == [@popular, @normal, @abandoned] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment