diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 09a808061..e79b8d777 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -52,6 +52,13 @@ RSpec.configure do |config| # the seed, which is printed after each run. # --seed 1234 #config.order = "random" + + # This is a workaround for a strange thing where ActionMailer::Base.deliveries isn't being + # cleared out correctly in controller specs. So, do it here for everything. + config.before(:each) do + ActionMailer::Base.deliveries = [] + end + end # XXX No idea what namespace/class/module to put this in |