diff options
Diffstat (limited to 'spec/lib/attachment_to_html/html_spec.rb')
-rw-r--r-- | spec/lib/attachment_to_html/html_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/attachment_to_html/html_spec.rb b/spec/lib/attachment_to_html/html_spec.rb new file mode 100644 index 000000000..65b63d383 --- /dev/null +++ b/spec/lib/attachment_to_html/html_spec.rb @@ -0,0 +1,24 @@ +require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') + +describe AttachmentToHTML::HTML do + + let(:adapter) { OpenStruct.new(:to_html => '<p>hello</p>', :success? => true) } + let(:html) { AttachmentToHTML::HTML.new(adapter) } + + describe :to_s do + + it 'returns the raw html' do + html.to_s.should == '<p>hello</p>' + end + + end + + describe :success? do + + it 'returns whether the conversion succeeded' do + html.success?.should be_true + end + + end + +end |