Class: RSpec::JsonMatchers::Expectations::Mixins::BuiltIn::NullableOf

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

Overview

It passes when any of expectation returns true It will pass regardless of Core::CompositeExpectation#expectations if the value is nil

API:

  • All classes within module should be able to be used / extended

Instance Method Summary collapse

Methods inherited from Core::CompositeExpectation

[]

Methods inherited from Core::CallableExpectation

[]

Methods inherited from RSpec::JsonMatchers::Expectation

build, build_many

Instance Method Details

#expect?(value) ⇒ Boolean

Returns:

API:

  • All classes within module should be able to be used / extended



137
138
139
# File 'lib/rspec/json_matchers/expectations/mixins/built_in.rb', line 137

def expect?(value)
  value.nil? || super
end