Sha256: 6de6c570062797c74649df04e5c0392caa1b2a0e4441b6977a701c4c605ab147
Contents?: true
Size: 789 Bytes
Versions: 23
Compression:
Stored size: 789 Bytes
Contents
require "rails_helper" <% module_namespacing do -%> RSpec.describe <%= Rails.version.to_f >= 5.0 ? class_name.sub(/(Mailer)?$/, 'Mailer') : class_name %>, <%= type_metatag(:mailer) %> do <% for action in actions -%> describe "<%= action %>" do let(:mail) { <%= Rails.version.to_f >= 5.0 ? class_name.sub(/(Mailer)?$/, 'Mailer') : class_name %>.<%= action %> } it "renders the headers" do expect(mail.subject).to eq(<%= action.to_s.humanize.inspect %>) expect(mail.to).to eq(["to@example.org"]) expect(mail.from).to eq(["from@example.com"]) end it "renders the body" do expect(mail.body.encoded).to match("Hi") end end <% end -%> <% if actions.blank? -%> pending "add some examples to (or delete) #{__FILE__}" <% end -%> end <% end -%>
Version data entries
23 entries across 23 versions & 2 rubygems