Class: JsonResponseMatchers::Base

Inherits:
Object
  • Object
show all
Includes:
RSpec::Matchers::Composable
Defined in:
lib/json_response_matchers/base.rb

Direct Known Subclasses

Content, Values

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expected) ⇒ Base

Returns a new instance of Base.


11
12
13
# File 'lib/json_response_matchers/base.rb', line 11

def initialize expected
  @expected = expected
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.


7
8
9
# File 'lib/json_response_matchers/base.rb', line 7

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.


7
8
9
# File 'lib/json_response_matchers/base.rb', line 7

def expected
  @expected
end

Instance Method Details

#at_key(*hash_keys) ⇒ Object


15
16
17
18
# File 'lib/json_response_matchers/base.rb', line 15

def at_key *hash_keys
  @keys = hash_keys
  self
end

#diffable?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'lib/json_response_matchers/base.rb', line 20

def diffable?
  true
end