Class: WebMock::RequestBodyDiff

Inherits:
Object
  • Object
show all
Defined in:
lib/specdiff/webmock.rb

Defined Under Namespace

Classes: PrettyPrintableThingy

Instance Method Summary collapse

Constructor Details

#initialize(request_signature, request_stub) ⇒ RequestBodyDiff

Returns a new instance of RequestBodyDiff.



6
7
8
9
# File 'lib/specdiff/webmock.rb', line 6

def initialize(request_signature, request_stub)
  @request_signature = request_signature
  @request_stub      = request_stub
end

Instance Method Details

#body_diffObject



25
26
27
28
# File 'lib/specdiff/webmock.rb', line 25

def body_diff
  specdiff = Specdiff.diff(request_stub_body, request_signature.body)
  PrettyPrintableThingy.new(specdiff)
end