Sha256: 621dafbd11e2b144ae2c377ec6af30dcaa383b6861c979e237650be45c741bd8

Contents?: true

Size: 632 Bytes

Versions: 1

Compression:

Stored size: 632 Bytes

Contents

require "spec_helper"

<% module_namespacing do -%>
describe <%= class_name %>, :type => :mailer do
<% for action in actions -%>
  describe "<%= action %>" do
    let(:mail) { <%= 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

1 entries across 1 versions & 1 rubygems

Version Path
rspec-rails-3.0.0.rc1 lib/generators/rspec/mailer/templates/mailer_spec.rb