Sha256: 2872ad7a4c7216b2871a8bf9b80d9310f7a466674481095b8e4e5e317e0d3036

Contents?: true

Size: 663 Bytes

Versions: 5

Compression:

Stored size: 663 Bytes

Contents

require 'spec_helper'

module Google
  module Book
    describe Response do
      use_vcr_cassette 'google'

      it "should set total results" do
        response = Book.search('deleuze')
        response.total_results.should > 0
      end

      it "should return entries" do
        response = Book.search('deleuze')
        response.first.should be_an Entry
      end

      context "when there is a single match" do
        it "should return entries" do
          Book.search('9780826490780').first.should be_an Entry
        end
      end

      it "should handle an empty query" do
        Book.search('').to_a.should be_empty
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
google-book-0.4.0 spec/google/book/response_spec.rb
google-book-0.3.3 spec/google/book/response_spec.rb
google-book-0.3.2 spec/google/book/response_spec.rb
google-book-0.3.1 spec/google/book/response_spec.rb
google-book-0.3.0 spec/google/book/response_spec.rb