aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lib
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/attachment_to_html/attachment_to_html_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/attachment_to_html/attachment_to_html_spec.rb b/spec/lib/attachment_to_html/attachment_to_html_spec.rb
index 41e1d67e5..1cf7debb7 100644
--- a/spec/lib/attachment_to_html/attachment_to_html_spec.rb
+++ b/spec/lib/attachment_to_html/attachment_to_html_spec.rb
@@ -18,6 +18,11 @@ describe AttachmentToHTML do
to_html(attachment).should == expected
end
+ it 'passes content injections options when rendering the result' do
+ html = to_html(attachment, :content_for => { :body_prefix => '<p>prefix</p>' })
+ html.should include('<p>prefix</p>')
+ end
+
it 'accepts a hash of options to pass to the adapter' do
options = { :wrapper => 'wrap' }
AttachmentToHTML::Adapters::Text.should_receive(:new).with(attachment, options).and_call_original