require File.expand_path('../../spec_helper', __FILE__) describe Mail::Part do it 'responds to +to_postmark+' do Mail::Part.new.must_respond_to(:to_postmark) end describe :to_postmark do it 'returns body hash if part is not an attachment' do part = Mail::Part.new do body "Think of me like Yoda, but instead of being little and green I wear suits and I'm awesome. I'm your bro-I'm Broda!" content_type 'text/plain' end content = "Think of me like Yoda, but instead of being little and green I wear suits and I'm awesome. I'm your bro-I'm Broda!" part.to_postmark.must_equal('Name' => nil, 'Content' => content, 'ContentType' => 'text/plain') end it 'returns body hash if part is not an attachment' do part = Mail::Part.new do body "
Think of me like Yoda, but instead of being little and green I wear suits and I'm awesome.
I'm your bro-I'm Broda!
Think of me like Yoda, but instead of being little and green I wear suits and I'm awesome.
I'm your bro-I'm Broda!