Skip to content

Instantly share code, notes, and snippets.

@mileszs
Created April 20, 2010 19:28
Show Gist options
  • Select an option

  • Save mileszs/372937 to your computer and use it in GitHub Desktop.

Select an option

Save mileszs/372937 to your computer and use it in GitHub Desktop.
describe ".ask_all_a_random_anonymous_question" do
before(:each) do
@user1 = Factory(:user)
@user2 = Factory(:user)
@user3 = Factory(:user)
User.stub(:all).and_return([@user1, @user2, @user3])
end
it "should ask each user a random anonymous question" do
@user1.should_receive(:ask_a_random_anonymous_question)
@user2.should_receive(:ask_a_random_anonymous_question)
@user3.should_receive(:ask_a_random_anonymous_question)
User.ask_all_a_random_anonymous_question
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment