Sha256: 778047b19b414ebb692b29fdb9cc0e22b68aeef4f0da21bd0c9a7a77fe6473a0

Contents?: true

Size: 667 Bytes

Versions: 5

Compression:

Stored size: 667 Bytes

Contents

require "spec_helper"

module Sucker
  describe "A Japanese request" do
    before do
      @worker = Sucker.new(
        :locale => "jp",
        :key    => amazon["key"],
        :secret => amazon["secret"])

      @worker << {
        "Operation"     => "ItemLookup",
        "IdType"        => "ASIN",
        "ResponseGroup" => ["ItemAttributes", "OfferFull"] }

      Sucker.stub(@worker)
    end

    context "single item" do
      before do
        @worker << { "ItemId" => "482224816X" }
        @item = @worker.get.node("Item").first
      end

      it "returns an array of items" do
        @item.should be_an_instance_of Hash
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sucker-0.9.2 spec/integration/japan_spec.rb
sucker-0.9.1 spec/integration/japan_spec.rb
sucker-0.9.0 spec/integration/japan_spec.rb
sucker-0.8.0 spec/integration/japan_spec.rb
sucker-0.7.1 spec/integration/japan_spec.rb