Class: RouteMechanic::RSpec::Matchers::BaseMatcher

Inherits:
Object
  • Object
show all
Includes:
RSpec::Matchers::Composable, Testing::Methods
Defined in:
lib/route_mechanic/rspec/matchers/base_matcher.rb

Instance Attribute Summary

Attributes included from Testing::Methods::MinitestCounters

#assertions

Instance Method Summary collapse

Methods included from Testing::Methods

#assert_all_routes, #assert_no_unused_actions, #assert_no_unused_routes

Constructor Details

#initialize(expected) ⇒ BaseMatcher

Returns a new instance of BaseMatcher.

Parameters:

  • expected (Rails::Application)


12
13
14
# File 'lib/route_mechanic/rspec/matchers/base_matcher.rb', line 12

def initialize(expected)
  @expected = expected
end

Instance Method Details

#descriptionObject

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/route_mechanic/rspec/matchers/base_matcher.rb', line 24

def description
  raise NotImplementedError
end

#failure_messageObject



20
21
22
# File 'lib/route_mechanic/rspec/matchers/base_matcher.rb', line 20

def failure_message
  @rescued_exception.message
end

#matches?(_actual) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/route_mechanic/rspec/matchers/base_matcher.rb', line 16

def matches?(_actual)
  raise NotImplementedError
end