spec/acceptance/excerpts_spec.rb in thinking-sphinx-3.0.3 vs spec/acceptance/excerpts_spec.rb in thinking-sphinx-3.0.4

- old
+ new

@@ -22,6 +22,28 @@ search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane search.first.excerpts.title. should == 'Война и <span class="match">миръ</span>' end + + it "does not include class names in excerpts" do + Book.create! :title => 'The Graveyard Book' + index + + search = Book.search('graveyard') + search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane + + search.first.excerpts.title. + should == 'The <span class="match">Graveyard</span> Book' + end + + it "respects the star option with queries" do + Article.create! :title => 'Something' + index + + search = Article.search('thin', :star => true) + search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane + + search.first.excerpts.title. + should == '<span class="match">Something</span>' + end end