module MandrillMailer
MandrilMailer helper module that requires custom matchers for use in RSpec specs. Example usage: In spec/spec_helper.rb): RSpec.configure do |config| # ... require "mandrill_mailer/rspec_helper" config.include MandrillMailer::RSpecHelper end In spec/mailers/user_mailer_spec.rb): require "rails_helper"
s
RSpec.describe UserMailer do let(:user) { create(:user) } context ".welcome" do let(:mailer) { described_class.welcome(user) } subject { mailer } it 'has the correct data' do expect(mailer).to use_template('Welcome') end end end
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/mandrill_mailer.rb, line 21 def self.config MandrillMailer::Railtie.config.mandrill_mailer end
configure(&block)
click to toggle source
# File lib/mandrill_mailer.rb, line 13 def self.configure(&block) if block_given? block.call(MandrillMailer::Railtie.config.mandrill_mailer) else MandrillMailer::Railtie.config.mandrill_mailer end end
deliveries()
click to toggle source
# File lib/mandrill_mailer/offline.rb, line 24 def self.deliveries @deliveries ||= [] end