Sha256: a34c8e91f793b0be6c0b3f5b6ac9be2ffb9a881da8dd66f6486cc36fa7c1ce57

Contents?: true

Size: 599 Bytes

Versions: 19

Compression:

Stored size: 599 Bytes

Contents

shared_examples_for "a searchable class" do
  it { subject.class.included_modules.should include(Highrise::Searchable) }

  it ".search" do
    find_args = {:from => "/#{subject.class.collection_name}/search.xml", :params => {"criteria[email]" => "john.doe@example.com", "criteria[zip]" => "90210"}}
    if subject.class.respond_to?(:find_all_across_pages)
      subject.class.should_receive(:find_all_across_pages).with(find_args)
    else
      subject.class.should_receive(:find).with(:all, find_args)
    end
    subject.class.search(:email => "john.doe@example.com", :zip => "90210")
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
highrise-3.2.3 spec/highrise/searchable_behavior.rb
highrise-3.2.1 spec/highrise/searchable_behavior.rb
highrise-3.1.6 spec/highrise/searchable_behavior.rb
highrise-3.1.5 spec/highrise/searchable_behavior.rb
highrise-3.1.2 spec/highrise/searchable_behavior.rb
highrise-3.1.1 spec/highrise/searchable_behavior.rb
highrise-3.1.0 spec/highrise/searchable_behavior.rb
highrise-3.1.0.pre spec/highrise/searchable_behavior.rb
highrise-3.0.5 spec/highrise/searchable_behavior.rb
highrise-3.0.4 spec/highrise/searchable_behavior.rb
highrise-3.0.3 spec/highrise/searchable_behavior.rb
peterosullivan-highrise-3.0.7 spec/highrise/searchable_behavior.rb
peterosullivan-highrise-3.0.6 spec/highrise/searchable_behavior.rb
peterosullivan-highrise-3.0.5 spec/highrise/searchable_behavior.rb
peterosullivan-highrise-3.0.4 spec/highrise/searchable_behavior.rb
peterosullivan-highrise-3.0.3 spec/highrise/searchable_behavior.rb
peterosullivan-highrise-3.0.2 spec/highrise/searchable_behavior.rb
highrise-3.0.1 spec/highrise/searchable_behavior.rb
highrise-3.0.0 spec/highrise/searchable_behavior.rb