Class: RSpec::JsonMatchers::Expectations::Mixins::BuiltIn::BooleanValue

Inherits:
Core::SingletonExpectation show all
Defined in:
lib/rspec/json_matchers/expectations/mixins/built_in.rb

Overview

Note:

The class does use name Boolean since so many gems uses it already You can also use gems like github.com/janlelis/boolean2/

Checks the value is a TrueClass or FalseClass

Instance Method Summary collapse

Methods inherited from Core::SingletonExpectation

inherited

Methods inherited from RSpec::JsonMatchers::Expectation

build, build_many

Instance Method Details

#expect?(value) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/rspec/json_matchers/expectations/mixins/built_in.rb', line 62

def expect?(value)
  true == value || false == value
end