Sha256: d4545cc03485f9700a457f8928dff761fa7ecc09cfba3ae933d5a40bec6fbdf9
Contents?: true
Size: 582 Bytes
Versions: 39
Compression:
Stored size: 582 Bytes
Contents
require File.expand_path('spec_helper', File.dirname(__FILE__)) describe 'query DSL', :type => :query do it 'should allow building search using block argument rather than instance_eval' do @blog_id = 1 session.search Post do |query| query.with(:blog_id, @blog_id) end connection.should have_last_search_including(:fq, 'blog_id_i:1') end it 'should accept a block in the #new_search method' do search = session.new_search(Post) { with(:blog_id, 1) } search.execute connection.should have_last_search_including(:fq, 'blog_id_i:1') end end
Version data entries
39 entries across 39 versions & 9 rubygems