Sha256: eb549ce949092cf69350275bb03f35eca050f8e0877c54cddee48cc654252ec3

Contents?: true

Size: 709 Bytes

Versions: 20

Compression:

Stored size: 709 Bytes

Contents

shared_examples_for "all pages" do
  it "knows if there is a next page" do
    @first_page.has_next?.should be_true
    @second_page.has_next?.should be_true
    @last_page.has_next?.should be_false
  end

  it "returns the next page when there is one" do
    @first_page.next_page.body.should =~ @second_page_test_regex
  end

  it "raises an exception when asked for a next page and there is none" do
    lambda {
      @last_page.next_page
    }.should raise_exception(AmazonSellerCentral::Page::NoNextPageAvailableError)
  end

  it "knows if it is the last page" do
    @first_page.last_page?.should be_false
    @second_page.last_page?.should be_false
    @last_page.last_page?.should be_true
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
amazon_seller_central-0.3.2 spec/support/page_examples.rb
amazon_seller_central-0.3.1 spec/support/page_examples.rb
amazon_seller_central-0.3.0 spec/support/page_examples.rb
amazon_seller_central-0.2.16 spec/support/page_examples.rb
amazon_seller_central-0.2.15 spec/support/page_examples.rb
amazon_seller_central-0.2.14 spec/support/page_examples.rb
amazon_seller_central-0.2.13 spec/support/page_examples.rb
amazon_seller_central-0.2.12 spec/support/page_examples.rb
amazon_seller_central-0.2.11 spec/support/page_examples.rb
amazon_seller_central-0.2.10 spec/support/page_examples.rb
amazon_seller_central-0.2.9 spec/support/page_examples.rb
amazon_seller_central-0.2.8 spec/support/page_examples.rb
amazon_seller_central-0.2.7 spec/support/page_examples.rb
amazon_seller_central-0.2.6 spec/support/page_examples.rb
amazon_seller_central-0.2.5 spec/support/page_examples.rb
amazon_seller_central-0.2.4 spec/support/page_examples.rb
amazon_seller_central-0.2.3 spec/support/page_examples.rb
amazon_seller_central-0.2.2 spec/support/page_examples.rb
amazon_seller_central-0.2.1 spec/support/page_examples.rb
amazon_seller_central-0.2.0 spec/support/page_examples.rb