File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11require 'rails_helper'
22
33RSpec . describe UserMailer , type : :mailer do
4+
45 include Rails . application . routes . url_helpers
56
67 let ( :achievement_id ) { 1 }
1112 end
1213
1314 it 'has correct subject' do
14- expect ( email . subject ) . to eq ( 'Congratulations with your new achievement!' )
15+ expect ( email . subject ) . to eq ( 'Congratulations with your new achievement!' )
1516 end
1617
1718 it 'has achievement link in body message' do
Original file line number Diff line number Diff line change 3838ActiveRecord ::Migration . maintain_test_schema!
3939
4040RSpec . configure do |config |
41+
4142 # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
4243 config . fixture_path = "#{ ::Rails . root } /spec/fixtures"
4344
6667 # arbitrary gems may also be filtered via:
6768 # config.filter_gems_from_backtrace("gem name")
6869
70+ # Clear out ActionMailer::Base.deliveries after RSpec test
71+ config . before ( :each ) { ActionMailer ::Base . deliveries . clear }
72+
6973 config . include Devise ::Test ::ControllerHelpers , type : :controller
7074
7175 Shoulda ::Matchers . configure do |config |
You can’t perform that action at this time.
0 commit comments