Sha256: 466923932f36d6fe05a8f532f54683963c0cfc7993dd49a14c2ac2d3010782d2

Contents?: true

Size: 604 Bytes

Versions: 10

Compression:

Stored size: 604 Bytes

Contents

require 'spec_helper'

<% module_namespacing do -%>
describe <%= class_name %> do
<% if actions.blank? -%>
  pending "add some examples to (or delete) #{__FILE__}"
<% else -%>
<% actions.each do |action| -%>
  describe '.<%= action %>' do
    let(:message) { <%= class_name %>.<%= action %> }
    let(:email) { message.email }

    it 'renders the headers' do
      email.subject.should eq('<%= action.to_s.humanize %>')
      email.from.should eq(['noreply@myapp.com'])
    end

    it 'renders the body' do
      email.body.encoded.should match('Hi')
    end
  end
<% end -%>
<% end -%>
end
<% end -%>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
outbox-rails-1.1.0 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-1.0.0 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.5.1 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.5.0 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.4.2 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.4.1 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.4.0 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.3.0 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.2.0 lib/generators/rspec/notifier/templates/notifier_spec.rb
outbox-rails-0.1.2 lib/generators/rspec/notifier/templates/notifier_spec.rb