Class: SunspotMatchersTestunit::HaveSearchParams
- Inherits:
-
Object
- Object
- SunspotMatchersTestunit::HaveSearchParams
- Includes:
- Test::Unit::Assertions
- Defined in:
- lib/sunspot_matchers_testunit/matchers.rb
Instance Method Summary collapse
- #get_matcher ⇒ Object
-
#initialize(session, method, *args) ⇒ HaveSearchParams
constructor
A new instance of HaveSearchParams.
Constructor Details
#initialize(session, method, *args) ⇒ HaveSearchParams
Returns a new instance of HaveSearchParams.
129 130 131 132 133 |
# File 'lib/sunspot_matchers_testunit/matchers.rb', line 129 def initialize(session, method, *args) @session = session @method = method @args = args end |
Instance Method Details
#get_matcher ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/sunspot_matchers_testunit/matchers.rb', line 135 def get_matcher matcher_class = case @method when :with WithMatcher when :without WithoutMatcher when :keywords KeywordsMatcher when :boost BoostMatcher when :facet FacetMatcher when :order_by OrderByMatcher when :paginate PaginationMatcher end matcher_class.new(@session, @args) end |