Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display keyword hashes in in expectation error messages
Ref: vcr/vcr#925 Ref: #1394 I spent quite a lot of time figuring this error: ``` 2) VCR.turned_on passes options through to .turn_off! Failure/Error: turn_off!(options) VCR received :turn_off! with unexpected arguments expected: ({:ignore_cassettes=>true}) got: ({:ignore_cassettes=>true}) # ./lib/vcr.rb:317:in `turned_on' # ./spec/lib/vcr_spec.rb:367:in `block (3 levels) in <top (required)>' ``` I quickly suspected it was a keyword argument issue, but it's far from obvious to everyone, and even when you are familair with the issue it doesn't tell you what was expected and what was received. I doubt the way I implemented this is ok, but I think it's worth opening the discussion ``` 2) VCR.turned_on passes options through to .turn_off! Failure/Error: turn_off!(options) VCR received :turn_off! with unexpected arguments expected: ({:ignore_cassettes=>true}) (keyword arguments) got: ({:ignore_cassettes=>true}) (options hash) # ./lib/vcr.rb:317:in `turned_on' # ./spec/lib/vcr_spec.rb:367:in `block (3 levels) in <top (required)>' ```
- Loading branch information