Sha256: 29c09db91bad072546a3290576b8ba3076d5eb1c9e7e3915687e731f12b958e1
Contents?: true
Size: 475 Bytes
Versions: 9
Compression:
Stored size: 475 Bytes
Contents
module IntegrationHelper def self.included(base) base.before(:all) do Sunspot.config.solr.url = ENV['SOLR_URL'] || 'http://localhost:8983/solr/default' Sunspot.reset!(true) end end def featured_for_posts(method, param, negated = false) with_method = negated ? :without : :with param = date_ranges[param] if param.is_a? String Sunspot.search(Post) do send(with_method, :featured_for).send(method, param) end.results end end
Version data entries
9 entries across 9 versions & 2 rubygems