spec/acceptance/excerpts_spec.rb in thinking-sphinx-3.2.0 vs spec/acceptance/excerpts_spec.rb in thinking-sphinx-3.3.0
- old
+ new
@@ -8,42 +8,42 @@
index
search = Book.search('gods')
search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
- search.first.excerpts.title.
- should == 'American <span class="match">Gods</span>'
+ expect(search.first.excerpts.title).
+ to eq('American <span class="match">Gods</span>')
end
it "handles UTF-8 text for excerpts" do
Book.create! :title => 'Война и миръ', :year => 1869
index
search = Book.search 'миръ'
search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
- search.first.excerpts.title.
- should == 'Война и <span class="match">миръ</span>'
+ expect(search.first.excerpts.title).
+ to eq('Война и <span class="match">миръ</span>')
end if ENV['SPHINX_VERSION'].try :[], /2.2.\d/
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'
+ expect(search.first.excerpts.title).
+ to eq('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>'
+ expect(search.first.excerpts.title).
+ to eq('<span class="match">Something</span>')
end
end