Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Catching test bug where email state propagates beyond single test run

  • Loading branch information...
commit 4b7b0819a234b754a41051d1fb4393b40b0e8762 1 parent 8a1c9d5
Nathan Hurst authored March 18, 2013
1  spec/controllers/mail_merges_controller_spec.rb
@@ -71,6 +71,7 @@ def valid_session
71 71
       end
72 72
 
73 73
       it "assigns a newly created mail_merge as @mail_merge" do
  74
+        ActionMailer::Base.deliveries.clear
74 75
         post :create, {:mail_merge => valid_attributes}, valid_session
75 76
         assigns(:mail_merge).should be_a(MailMerge)
76 77
         assigns(:mail_merge).should be_persisted
2  spec/models/mail_merge_spec.rb
@@ -4,6 +4,8 @@
4 4
   describe 'email generation' do
5 5
 
6 6
     it 'should generate emails for a complete mail merge' do
  7
+      ActionMailer::Base.deliveries.clear
  8
+
7 9
       mm = create(:mail_merge)
8 10
       mm.emails.length.should == 4
9 11
 

0 notes on commit 4b7b081

Please sign in to comment.
Something went wrong with that request. Please try again.