scenario "root page" do
visit root_path
puts 'A'
expect(page).to have_link("Login", href: login_path(locale: I18n.locale))
puts 'B'
expect(page).to have_link("Signup", href: signup_path(locale: I18n.locale))
puts 'C'
end
let(:confirm_oauth) { double deliver_now: nil }
before do
allow(ConfirmOauth).to receive(:email_confirmation)
.and_return confirm_oauth
end
subject! { do_something_that_calls_mailer }
it do
expect(ConfirmOauth).to have_received(:email_confirmation).with user
expect(confirm_oauth).to have_received :deliver_now
end