class RSpec::SleepingKingStudios::Matchers::Core::BeBooleanMatcher
Matcher for testing whether an object is true or false.
@since 1.0.0
Public Instance Methods
Source
# File lib/rspec/sleeping_king_studios/matchers/core/be_boolean_matcher.rb, line 14 def description 'be true or false' end
(see BaseMatcher#description
)
Source
# File lib/rspec/sleeping_king_studios/matchers/core/be_boolean_matcher.rb, line 30 def failure_message "expected #{@actual.inspect} to be true or false" end
Source
# File lib/rspec/sleeping_king_studios/matchers/core/be_boolean_matcher.rb, line 35 def failure_message_when_negated "expected #{@actual.inspect} not to be true or false" end
Source
# File lib/rspec/sleeping_king_studios/matchers/core/be_boolean_matcher.rb, line 23 def matches? actual super true === actual || false === actual end
Checks if the object is true or false.
@param [Object] actual The object to check.
@return [Boolean] True if the object is true or false, otherwise false.
Calls superclass method
RSpec::SleepingKingStudios::Matchers::BaseMatcher#matches?