Class: RSpec::JsonMatchers::Expectations::Abstract::NumericExpectation Abstract

Inherits:
Core::SingletonExpectation show all
Extended by:
AbstractClass
Defined in:
lib/rspec/json_matchers/expectations/abstract.rb

Overview

This class is abstract.

Only for reducing code duplication

Note:

Numeric might not be the best class to check for Since not all subclasses of it are expected But for simplicity’s sake this is used until problem raised

Verifies the value passed in is a Numeric

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)


30
31
32
# File 'lib/rspec/json_matchers/expectations/abstract.rb', line 30

def expect?(value)
  value.is_a?(Numeric)
end