Sha256: 6b7331fbaf84ffee978d51e8214ffaaaf0640fba883c698c145ae765aa8034a9

Contents?: true

Size: 661 Bytes

Versions: 2

Compression:

Stored size: 661 Bytes

Contents

require 'spec_helper'

describe EmailManager::ManagedEmailObserver do
  describe "deliver_email" do
    before(:each) do
      DummyMailer.dummy_email_notification.deliver
    end

    it "should only store the calling file of the email if it is in /app" do
      email = EmailManager::ManagedEmail.last
      email.caller.should == ""
    end

    it "should create a ManagedEmail instance" do
      email = EmailManager::ManagedEmail.last 
      email.to.should == "test@email_manager.gem"
      email.subject.should == "Dummy email notification"
      email.body.should == "This is a dummy email notification.  It should never be sent.\n"
    end
  end 
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
email_manager-1.0.0 spec/managed_email_observer_spec.rb
email_manager-0.0.6 spec/managed_email_observer_spec.rb