Exception: GraphWeaver::Testing::MissingRecording

Inherits:
Error
  • Object
show all
Defined in:
lib/graph_weaver/testing/cassette.rb

Overview

Raised by Replayer when a request has no recording.

Instance Method Summary collapse

Methods inherited from Error

#to_h

Constructor Details

#initialize(path:, query:) ⇒ MissingRecording

Returns a new instance of MissingRecording.



12
13
14
15
16
17
18
19
# File 'lib/graph_weaver/testing/cassette.rb', line 12

def initialize(path:, query:)
  super(<<~MSG.strip)
    no recording for this request in #{path} — re-record it
    (Recorder / Cassette.use with a live client, or delete
    the cassette to start over). Query:
    #{query.strip[0, 200]}
  MSG
end