Skip to content

Recording modes

Sergey edited this page Jul 28, 2018 · 1 revision

YHVRecordMode

VCR request recording modes described by YHVRecordMode typedef.

YHVRecordOnce
Mode in which requests will be written only to new cassette.
This mode useful when it is required to create cassette and track whether any unexpected requests is sent (in this case VCR will throw and exception).

YHVRecordNew
Mode in which requests will be recorded at current play head position.
This mode useful in cases when new test cases has been added to suite and response for them should be stubbed as well. With this mode will be impossible to track whether code send unexpected requests.

YHVRecordNone
Mode in which requests can't be written at all.
This mode completely protects cassette from writings (almost like YHVRecordOnce which allow to write initial cassette).

YHVRecordAll
Mode in which any requests will be written. When cassette inserted and this mode is set, all it's content will be removed. This mode useful in cases when stubbed content outdated since remote changed output format or information which is sent.

Clone this wiki locally