Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Created July 13, 2011 00:26
Show Gist options
  • Save danielvlopes/1079493 to your computer and use it in GitHub Desktop.
Save danielvlopes/1079493 to your computer and use it in GitHub Desktop.
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