html_email_creator 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,10 +15,11 @@ module HtmlEmailCreator
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def save
|
18
|
-
FileUtils.mkdir_p(@settings.output_path) unless File.exists?(@settings.output_path)
|
19
18
|
file = File.join(@settings.output_path, "#{@output_basename}.#{@formatter.extension}")
|
20
|
-
File.
|
21
|
-
|
19
|
+
directory = File.dirname(file)
|
20
|
+
FileUtils.mkdir_p(directory) unless File.exists?(directory)
|
21
|
+
File.open(file, "w") do |opened_file|
|
22
|
+
opened_file.write(get)
|
22
23
|
end
|
23
24
|
file
|
24
25
|
end
|
@@ -98,8 +98,8 @@ eos
|
|
98
98
|
it "should store all correct versions of emails recursively" do
|
99
99
|
emails = creator.save_emails(".", true)
|
100
100
|
|
101
|
-
read_fixture("complex_with_config", "Output", "basic_text.html").should == expected_basic_text_html
|
102
|
-
read_fixture("complex_with_config", "Output", "basic_text.txt").should == expected_basic_text_txt
|
101
|
+
read_fixture("complex_with_config", "Output", "cool", "basic_text.html").should == expected_basic_text_html
|
102
|
+
read_fixture("complex_with_config", "Output", "cool", "basic_text.txt").should == expected_basic_text_txt
|
103
103
|
read_fixture("with_config", "Output", "first.html").should == expected_first_html
|
104
104
|
read_fixture("with_config", "Output", "first.txt").should == expected_first_txt
|
105
105
|
end
|