spec/unit/sucker/request_spec.rb in sucker-1.0.0.beta.3 vs spec/unit/sucker/request_spec.rb in sucker-1.0.0.beta.4
- old
+ new
@@ -56,11 +56,21 @@
worker.curl.interface.should eql "eth1"
end
end
context "#get" do
- it "returns a Response object" do
- worker.get.class.ancestors.should include Sucker::Response
+ it "returns a response" do
+ worker.get.class.ancestors.should include Response
+ end
+ end
+
+ context "#get!" do
+ it "raises if response is not valid" do
+ worker << {
+ "Operation" => "ItemLookup",
+ "IdType" => "ASIN",
+ "ItemId" => "0816614024" }
+ lambda { worker.get! }.should raise_error ResponseError
end
end
context "#key=" do
it "sets the Amazon AWS access key in the parameters" do