Sha256: 2c4c027e3240ba3ab443a4ec1b1b039f278ad581dab2c89fdba8480d45dd0cb3
Contents?: true
Size: 946 Bytes
Versions: 5
Compression:
Stored size: 946 Bytes
Contents
require 'spec_helper' module Untied module Publisher describe BaseProducer do context ".new" do it "should raise exception when there is no service_name" do Publisher.config.stub(:service_name).and_return(nil) expect { BaseProducer.new }.to raise_error(ArgumentError, /you should inform service_name/) end %w(routing_key service_name deliver_messages).each do |attr| it "should have #{attr} attr reader" do BaseProducer.new.should respond_to(attr) end end it "should log when message delivering is setted to false" do Publisher.config.logger.should_receive(:info). with(/Producer intialized with options/) Publisher.config.logger.should_receive(:info). with(/Channel was not/) BaseProducer.new(:deliver_messages => false) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems