aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/isolation
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2015-05-04 10:43:52 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2015-05-04 10:56:59 +0100
commit60239f3e5a3303b4135e30469ba7dbf27890008d (patch)
tree4da42b69cae65df57d5caaab6a7d9259846204a5 /railties/test/isolation
parent9f39d3126fe85c94198371fd1cccd408c268529c (diff)
downloadrails-60239f3e5a3303b4135e30469ba7dbf27890008d.tar.gz
rails-60239f3e5a3303b4135e30469ba7dbf27890008d.tar.bz2
rails-60239f3e5a3303b4135e30469ba7dbf27890008d.zip
Add support for inline images to mailer previews
Use a preview interceptor to search for inline cid: urls in src attributes and convert them to data urls.
Diffstat (limited to 'railties/test/isolation')
-rw-r--r--railties/test/isolation/abstract_unit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb
index 4509797da1..65d8a55421 100644
--- a/railties/test/isolation/abstract_unit.rb
+++ b/railties/test/isolation/abstract_unit.rb
@@ -270,9 +270,9 @@ module TestHelpers
File.open(file, "w+") { |f| f.puts contents }
end
- def app_file(path, contents)
+ def app_file(path, contents, mode = 'w')
FileUtils.mkdir_p File.dirname("#{app_path}/#{path}")
- File.open("#{app_path}/#{path}", 'w') do |f|
+ File.open("#{app_path}/#{path}", mode) do |f|
f.puts contents
end
end