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
75 76 77 78 79 |
# File 'lib/sunspot_matchers/test_helper.rb', line 75 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
69 70 71 72 73 |
# File 'lib/sunspot_matchers/test_helper.rb', line 69 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
86 87 88 89 |
# File 'lib/sunspot_matchers/test_helper.rb', line 86 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
81 82 83 84 |
# File 'lib/sunspot_matchers/test_helper.rb', line 81 def assert_is_search_for(session, expected_class) matcher = BeASearchForSession.new(session, expected_class) assert matcher.match?, matcher. end |