Skip to content

Instantly share code, notes, and snippets.

@TomV
Created December 5, 2010 16:47
Show Gist options
  • Save TomV/729232 to your computer and use it in GitHub Desktop.
Save TomV/729232 to your computer and use it in GitHub Desktop.
# @alert object set up in before proc
it "should have date after sending message" do
email = mock('email')
Mailer.should_receive(:new).and_return(email)
email.should_receive(:send)
email.should_receive(:send)
@alert.send_alert()
@alert.sent_at.class.should == DateTime
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment