Sha256: 431808585b141fbd637de52dd05b1d1422aa9b15f1548ef6abc313baee542ad4

Contents?: true

Size: 529 Bytes

Versions: 3

Compression:

Stored size: 529 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper')

describe 'Sunspot Spec Integration - integrate sunspot' do
  integrate_sunspot
  
  it "should call sunspot" do
    @post = PostWithAuto.create!
    Sunspot.commit
    PostWithAuto.search.results.should == [@post]
  end
end

describe 'Sunspot Spec Integration - mock sunspot' do
  it "should call sunspot" do
    Sunspot.remove_all
    Sunspot.commit
    @post = PostWithAuto.create!
    Sunspot.commit
    PostWithAuto.search.results.should_not include(@post)
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
benjaminkrause-sunspot_rails-0.10.5 spec/sunspot_mocking_spec.rb
kuahyeow-sunspot_rails-0.10.7 spec/sunspot_mocking_spec.rb
kuahyeow-sunspot_rails-0.10.6 spec/sunspot_mocking_spec.rb