module SunspotMatchers::TestHelper

Public Instance Methods

assert_has_no_search_params(session, *method_and_args, &block) click to toggle source
# 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.unexpected_match_error_message
end
assert_has_search_params(session, *method_and_args, &block) click to toggle source
# 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.missing_param_error_message
end
assert_is_not_search_for(session, expected_class) click to toggle source
# 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.failure_message_for_should_not
end
assert_is_search_for(session, expected_class) click to toggle source
# 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.failure_message_for_should
end