BikeBikeBike/spec/support/mailer_macros.rb
Cesidio Di Landa bc85296079 Bumped VERSION to 0.2.0
Updated CHANGELOG
Rails 4.0.0rc1
Improved and fixed spec helper
2013-05-02 11:41:41 +02:00

18 lines
262 B
Ruby

module MailerMacros
def last_email
ActionMailer::Base.deliveries.last
end
def reset_email
ActionMailer::Base.deliveries = []
end
end
RSpec.configure do |config|
config.include MailerMacros
config.before(:each) do
reset_email
end
end