Method: Expected::Matchers::ExtendModuleMatcher#matches?

Defined in:
lib/expected/matchers/extend_module.rb

#matches?(subject) ⇒ True, False

Run the test

Parameters:

  • subject

    The thing to test against

Returns:

  • (True)

    If the test passes

  • (False)

    if the test fails



31
32
33
34
35
# File 'lib/expected/matchers/extend_module.rb', line 31

def matches?(subject)
  self.subject = subject
  klass = self.subject.singleton_class
  klass.included_modules.include? expected_module
end