Sha256: 2b6c8e21d0bf34a2417ec0302d46d534e7096737ede893551104ba3fb39c5320

Contents?: true

Size: 666 Bytes

Versions: 88

Compression:

Stored size: 666 Bytes

Contents

# coding: utf-8
#
require 'spec_helper'
require 'picky-client/spec'

describe 'Integration Tests' do

  before(:all) do
    Picky::Indexes.index
    Picky::Indexes.load
  end

  let(:books) { Picky::TestClient.new(BookSearch, :path => '/books') }

  # Testing a count of results.
  #
  it { books.search('a s').total.should == 57 }

  # Testing a specific order of result ids.
  #
  it { books.search('alan').ids.should == [449, 259, 307] }

  # Testing an order of result categories.
  #
  it { books.search('alan').should have_categories(['title'], ['author']) }
  it { books.search('alan p').should have_categories(['title', 'author'], ['author', 'title']) }

end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
picky-generators-4.21.2 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.21.1 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.21.0 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.20.2 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.20.1 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.20.0 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.7 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.6 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.5 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.4 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.3 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.2 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.1 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.19.0 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.18.0 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.17.1 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.17.0 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.16.0 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.15.1 prototypes/server/sinatra/spec/integration_spec.rb
picky-generators-4.15.0 prototypes/server/sinatra/spec/integration_spec.rb