Sha256: 92b14c6a3d38efdf1d3067fbd76b1bd47eb1cead34a795e7e6ca7ab9a1f44bac
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "ChimpsterRails3" do it "should allow setting an api key" do Chimpster.stub!(:send_through_chimpster) ActionMailer::Base.chimpster_settings = {:api_key => 'api-key'} ActionMailer::Base.chimpster_settings[:api_key].should == 'api-key' Chimpster.should_receive(:api_key=).with('api-key') TestMailer.simple_message.deliver end it "should use chimpster for delivery" do Chimpster.should_receive(:send_through_chimpster) do |message| message.subject.should == "hello" end TestMailer.simple_message.deliver end it "should allow tagging of message" do Chimpster.should_receive(:send_through_chimpster) do |message| message.tag.to_s.should == "delivery" end TestMailer.tagged_message.deliver end it "should work with multipart messages" do Chimpster.should_receive(:send_through_chimpster) do |message| message.should be_multipart message.body_text.strip.should == "hello" message.body_html.strip.should == "<b>hello</b>" end TestMailer.multipart_message.deliver end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chimpster-rails-0.1.0 | spec/chimpster-rails_spec.rb |