From 7b3b1eee0b7a947b642c1f051e890fa29a007659 Mon Sep 17 00:00:00 2001 From: David Cornu Date: Sun, 7 Oct 2012 18:43:17 -0400 Subject: [PATCH] Replace @location with location as deliver_method_spec.rb now uses rspec's let(:location) to define it in all tests. --- spec/letter_opener/delivery_method_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/letter_opener/delivery_method_spec.rb b/spec/letter_opener/delivery_method_spec.rb index 4920dde..637e59a 100644 --- a/spec/letter_opener/delivery_method_spec.rb +++ b/spec/letter_opener/delivery_method_spec.rb @@ -177,9 +177,9 @@ end attachments[File.basename(__FILE__)] = File.read(__FILE__) end - attachment_path = Dir["#{@location}/*/attachments/#{File.basename(__FILE__)}"].first + attachment_path = Dir["#{location}/*/attachments/#{File.basename(__FILE__)}"].first File.exists?(attachment_path).should == true - text = File.read(Dir["#{@location}/*/plain.html"].first) + text = File.read(Dir["#{location}/*/plain.html"].first) text.should include(File.basename(__FILE__)) end @@ -195,9 +195,9 @@ body "Here's an image: " end end - attachment_path = Dir["#{@location}/*/attachments/#{File.basename(__FILE__)}"].first + attachment_path = Dir["#{location}/*/attachments/#{File.basename(__FILE__)}"].first File.exists?(attachment_path).should == true - text = File.read(Dir["#{@location}/*/rich.html"].first) + text = File.read(Dir["#{location}/*/rich.html"].first) mail.parts[0].body.should include(mail.attachments[0].url) text.should_not include(mail.attachments[0].url) text.should include("attachments/#{File.basename(__FILE__)}")