Skip to content

Instantly share code, notes, and snippets.

View nbraem's full-sized avatar

Nicolas Braem nbraem

  • Antwerp, Belgium
View GitHub Profile
require File.join(File.dirname(__FILE__), 'spec_helper')
describe 'function query' do
it "should send query to solr with function query from a block" do
session.search Post do
keywords('pizza') do
boost(function { :average_rating })
end
end
connection.should have_last_search_including(:bf, 'average_rating_f')