Module: SunspotMatchers::TestHelper
- Defined in:
- lib/sunspot_matchers/test_helper.rb
Instance Method Summary collapse
- #assert_has_no_search_params(session, *method_and_args, &block) ⇒ Object
- #assert_has_search_params(session, *method_and_args, &block) ⇒ Object
- #assert_is_not_search_for(session, expected_class) ⇒ Object
- #assert_is_search_for(session, expected_class) ⇒ Object
Instance Method Details
#assert_has_no_search_params(session, *method_and_args, &block) ⇒ Object
72 73 74 75 76 |
# File 'lib/sunspot_matchers/test_helper.rb', line 72 def assert_has_no_search_params(session, *method_and_args, &block) method, *args = method_and_args matcher = HaveSearchParamsForSession.new(session, method, *args, &block).get_matcher assert !matcher.match?, matcher. end |
#assert_has_search_params(session, *method_and_args, &block) ⇒ Object
66 67 68 69 70 |
# File 'lib/sunspot_matchers/test_helper.rb', line 66 def assert_has_search_params(session, *method_and_args, &block) method, *args = method_and_args matcher = HaveSearchParamsForSession.new(session, method, *args, &block).get_matcher assert matcher.match?, matcher. end |
#assert_is_not_search_for(session, expected_class) ⇒ Object
83 84 85 86 |
# File 'lib/sunspot_matchers/test_helper.rb', line 83 def assert_is_not_search_for(session, expected_class) matcher = BeASearchForSession.new(session, expected_class) assert !matcher.match?, matcher. end |
#assert_is_search_for(session, expected_class) ⇒ Object
78 79 80 81 |
# File 'lib/sunspot_matchers/test_helper.rb', line 78 def assert_is_search_for(session, expected_class) matcher = BeASearchForSession.new(session, expected_class) assert matcher.match?, matcher. end |