spec/unit/sucker/request_spec.rb in sucker-1.1.2 vs spec/unit/sucker/request_spec.rb in sucker-1.1.3

- old
+ new

@@ -121,10 +121,21 @@ worker.locale = nil expect do worker.get end.to raise_error(/Locale missing/) end + + it "sets options on curl" do + easy = mock + easy.should_receive(:interface=).once.with("eth1") + Curl::Easy.stub!(:perform).and_yield(easy) + Response.should_receive(:new).once + + worker.curl_opts { |c| c.interface = 'eth1' } + worker.get + end + end describe "#get_all" do it "returns an array of responses" do @@ -143,10 +154,12 @@ count += 1 end count.should eql Request::HOSTS.size end + end + end describe "#key" do it "returns the Amazon AWS access key for the current locale" do