spec/queue_poller_spec.rb in pheme-0.0.2 vs spec/queue_poller_spec.rb in pheme-0.0.3

- old
+ new

@@ -8,9 +8,23 @@ before(:each) do use_default_configuration! allow(Aws::SQS::QueuePoller).to receive(:new) { poller } end + describe ".new" do + context "when initialized with valid params" do + it "does not raise an error" do + expect { ExampleQueuePoller.new(queue_url: "queue_url") }.not_to raise_error + end + end + + context "when initialized with a nil queue_url" do + it "raises an ArgumentError" do + expect { ExampleQueuePoller.new(queue_url: nil) }.to raise_error(ArgumentError) + end + end + end + describe "#poll" do before(:each) do module ActiveRecord class Base def self.connection_pool