spec/railtie_spec.rb in simple_postmark-0.4.1 vs spec/railtie_spec.rb in simple_postmark-0.4.2

- old
+ new

@@ -51,21 +51,22 @@ 'Subject' => "I'm your bro!", 'To' => 'ted@himym.tld' } end + before do stub_request(:post, url) end - it 'should respond to +simple_postmark_settings+' do + it 'responds to +simple_postmark_settings+' do ActionMailer::Base.must_respond_to(:simple_postmark_settings) end - it 'should allow setting an api key' do + it 'allows setting an api key' do ActionMailer::Base.simple_postmark_settings = { api_key: api_key } ActionMailer::Base.simple_postmark_settings[:api_key].must_equal(api_key) end @@ -74,25 +75,25 @@ before do ActionMailer::Base.simple_postmark_settings = { api_key: api_key } end - it 'should work' do + it 'works' do NotificationMailer.im_your_bro.deliver assert_requested(:post, url, headers: headers, body: merge_body) end - it 'should allow tags' do + it 'allows tags' do NotificationMailer.im_your_bro_tagged.deliver assert_requested(:post, url, headers: headers, body: merge_body('Tag' => 'simple-postmark')) end - it 'should work with attachments' do + it 'works with attachments' do attachment = { 'Content' => [File.read(File.join(File.dirname(__FILE__), 'thebrocode.jpg'))].pack('m'), 'ContentType' => 'image/jpeg', 'Name' => 'thebrocode.jpg' } @@ -101,10 +102,10 @@ assert_requested(:post, url, headers: headers, body: merge_body('Subject' => 'The Brocode!', 'Attachments' => [attachment])) end - it 'should work with multipart messages' do + it 'works with multipart messages' do bodies = { 'HtmlBody' => "<p>Think of me like Yoda, but instead of being little and green I wear suits and I'm awesome.<br /><br />I'm your bro-I'm Broda!</p>", 'TextBody' => "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!" } \ No newline at end of file