How do I test Pony emailing in a Sinatra app, using rspec?
问题 I'm trying out email_spec, which says it supports Pony, but I'm not sure how I'd go about testing emails in a sinatra app. The examples in the readme show usages with rails ActionMailer , but not in Pony. Not precious about using email_spec, so any other ideas for testing emails using rspec in sinatra are welcomed =) 回答1: I ended up looking at the pony spec file, and stealing code from it to write my specs =) This is what I have: ./spec/spec_helper.rb def do_not_send_email Pony.stub!(:deliver