Sha256: ae045070aaadc11fa8b8e65a2c6e56ed5c5fe15c34fc0c15222449c785e03c17

Contents?: true

Size: 430 Bytes

Versions: 5

Compression:

Stored size: 430 Bytes

Contents

require 'acceptance/spec_helper'

describe 'Accessing excerpts for methods on a search result', :live => true do
  it "returns excerpts for a given method" do
    Book.create! :title => 'American Gods', :year => 2001
    index

    search = Book.search('gods')
    search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane

    search.first.excerpts.title.
      should == 'American <span class="match">Gods</span>'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.2 spec/acceptance/excerpts_spec.rb
thinking-sphinx-3.0.1 spec/acceptance/excerpts_spec.rb
thinking-sphinx-3.0.0 spec/acceptance/excerpts_spec.rb
thinking-sphinx-3.0.0.rc spec/acceptance/excerpts_spec.rb
thinking-sphinx-3.0.0.pre spec/acceptance/excerpts_spec.rb