-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hi @levinmr, thanks for creating and maintaining this gem, it's super useful.
One thing that I've noticed that's a bit frustrating is that the entire snapshot content is included in the rspec description:
rspec-snapshot/lib/rspec/snapshot/matchers/match_snapshot.rb
Lines 50 to 52 in 8ecbe55
| def description | |
| "to match a snapshot containing: \"#{@expected}\"" | |
| end |
This means if you're looking through the logs, debugging a failure, etc., you can end up with a really long rspec log file with:
is expected to to match a snapshot containing: <entire contents of the snapshot>
for a few hundred or thousand lines.
It's not really valuable to have the contents in the rspec output like this, and if the spec fails the failure message then includes a duplicate of it along with the actual results, increasing the overall output again.
How would you feel about alternatives:
- make it optional to include the contents in the description
- drop the snapshot contents and provide a generic/customisable description instead
- provide a link to the snap file instead of the contents?
I'm happy to have a look and raise a PR if you're open to the suggestion.