Permalink
Browse files

Replace @location with location as deliver_method_spec.rb now uses rs…

…pec's let(:location) to define it in all tests.
  • Loading branch information...
1 parent f0d0028 commit 7b3b1eee0b7a947b642c1f051e890fa29a007659 @davidcornu committed Oct 7, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 spec/letter_opener/delivery_method_spec.rb
View
8 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: <img src='#{url}' />"
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__)}")

0 comments on commit 7b3b1ee

Please sign in to comment.