Sha256: 1e9c0835841749d3a341e46210ef4c7a7b210fe2552a9179a418cca1f7671d76
Contents?: true
Size: 747 Bytes
Versions: 9
Compression:
Stored size: 747 Bytes
Contents
require "rails_helper" <% module_namespacing do -%> RSpec.describe <%= class_name %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>, <%= type_metatag(:mailer) %> do <% for action in actions -%> describe "<%= action %>" do let(:mail) { <%= class_name %><%= Rails.version.to_f >= 5.0 ? "Mailer" : "" %>.<%= 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
9 entries across 9 versions & 2 rubygems