Sha256: e16608e9d4fbb20aaf2777572d93c1c66b78e24078973b696e431f105f9e33e4

Contents?: true

Size: 623 Bytes

Versions: 2

Compression:

Stored size: 623 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), 'spec_helper')

class CommonMailer
  include Resque::Mailer
end

describe Resque::Mailer do
  describe ".queue" do
    context "when not changed" do
      it "should return 'mailer'" do
        CommonMailer.queue.should == "mailer"
      end
    end

    context "when changed" do
      before do
        @my_default_queue = "foobar"
        Resque::Mailer.should_receive(:default_queue_name).and_return(@my_default_queue)
      end

      it "should return proper queue name" do
        CommonMailer.queue.should == @my_default_queue
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque_mailer-1.0.1 spec/common_spec.rb
resque_mailer-1.0.0 spec/common_spec.rb