I am writing some rspec tests and I notice that it slows down when accessing my Mailer class. Is there a way to completely exhaust the ActionMailer :: Base class so that I can test other components of my controller before and after email delivery?
Here is the mailer class definition
class OrganisationMailer < ActionMailer::Base
Here is one of the tests I wrote
require 'spec_helper' describe OrganisationsController do describe "#email_single" do context "With email address" do let(:org) {Organisation.make!} it "redirects to listing" do get :email_single, :id => org.id response.should redirect_to(organisations_path) end end end end
source share