Class: Mocktail::Matchers::Not

Inherits:
Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/mocktail/matchers/not.rb,
lib/mocktail/sorbet/mocktail/matchers/not.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #is_mocktail_matcher?

Constructor Details

This class inherits a constructor from Mocktail::Matchers::Base

Class Method Details

.matcher_nameObject



5
6
7
# File 'lib/mocktail/matchers/not.rb', line 5

def self.matcher_name
  :not
end

Instance Method Details

#match?(actual) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/mocktail/matchers/not.rb', line 9

def match?(actual)
  @expected != actual
end