From dc6fd5c8a369b3128629586561967c7842896920 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Thu, 12 Jan 2012 17:51:57 +0000 Subject: Improve test isolation I was seeing some test failures, apparently caused by inadequate test isolation. This change fixed them. --- spec/lib/tmail_extensions_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/lib/tmail_extensions_spec.rb') diff --git a/spec/lib/tmail_extensions_spec.rb b/spec/lib/tmail_extensions_spec.rb index 6a55c34da..02ef8b82e 100644 --- a/spec/lib/tmail_extensions_spec.rb +++ b/spec/lib/tmail_extensions_spec.rb @@ -5,6 +5,11 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "when using TMail" do + fixtures :info_requests, :incoming_messages + + before(:each) do + ActionMailer::Base.deliveries.clear + end it "should load an email with funny MIME settings" do # just send it to the holding pen -- cgit v1.2.3 From ac4587afff81177a0bf86fc0064b81538811cb29 Mon Sep 17 00:00:00 2001 From: Robin Houston Date: Tue, 31 Jan 2012 16:29:04 +0000 Subject: Load all fixtures for all tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ad hoc specification of fixtures has been an ongoing source of bugs in the tests. The straw that broke the camel’s back is that 7c6eb09 requires the fixtures to be loaded in order (i.e. children before their parents), and it would have been a painful process to reorder all the dozens of different fixture lists, but the test system ought to be more reliable this way. --- spec/lib/tmail_extensions_spec.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'spec/lib/tmail_extensions_spec.rb') diff --git a/spec/lib/tmail_extensions_spec.rb b/spec/lib/tmail_extensions_spec.rb index 02ef8b82e..bd89e6a84 100644 --- a/spec/lib/tmail_extensions_spec.rb +++ b/spec/lib/tmail_extensions_spec.rb @@ -5,7 +5,6 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "when using TMail" do - fixtures :info_requests, :incoming_messages before(:each) do ActionMailer::Base.deliveries.clear -- cgit v1.2.3