Sha256: d3c158456f7968b40e647876533d2a05d04cb7bd9ae11bf67c72ae8a37c26728
Contents?: true
Size: 707 Bytes
Versions: 6
Compression:
Stored size: 707 Bytes
Contents
require 'spec_helper' class MyMailer < ApiMailer::Base def mail_me(options) mail(options) end end module ApiMailer describe Base do it "should create an instance and call instance method when the calling the class method" do MyMailer.any_instance.should_receive :mail_me MyMailer.mail_me end it "should call deliver_message and build_message when you deliver a message" do Rails.env.stub(:test?).and_return(false) MyMailer.any_instance.should_receive :collect_responses message = MyMailer.mail_me(to: "billy@example.com") message.should_receive :build_message message.should_receive :deliver_message message.deliver end end end
Version data entries
6 entries across 6 versions & 1 rubygems