Skip to content

Instantly share code, notes, and snippets.

@marcelloma
Created April 19, 2011 13:42
Show Gist options
  • Save marcelloma/927761 to your computer and use it in GitHub Desktop.
Save marcelloma/927761 to your computer and use it in GitHub Desktop.
describe User do
describe "other_users"do
it "should return other users" do
User.delete_all
me = Factory(:user)
other_one = Factory(:user)
other_two = Factory(:user)
User.other_users(me).all.should_not be_empty
User.other_users(me).count.should == 2
User.other_users(me).include?(me).should_not
end
end
end
@marcelloma
Copy link
Author

describe User do
describe "other_users" do
before {
User.delete_all

  me = Factory(:user)
  other_one = Factory(:user)
  other_two = Factory(:user)
}
subject { User.other_users(me).all }
it { should_not include(me) }
end

end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment