Skip to content

Commit ddbf51e

Browse files
pftgclaude
andcommitted
docs: add custom framework finalize_reporters! and vips install notes
- Document how to call finalize_reporters! for custom test frameworks - Add brew/apt install commands for libvips in Requirements Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 70a629c commit ddbf51e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,20 @@ Comparisons add ~50ms per image with VIPS. Without `ruby-vips`, ChunkyPNG is use
194194
`DEBUG=1 bundle exec rake test` keeps `.diff.png` files for inspection.
195195
</details>
196196

197+
## Custom Test Frameworks
198+
199+
Minitest, RSpec, and Cucumber are supported out of the box. For other frameworks, call `finalize_reporters!` after all tests complete:
200+
201+
```ruby
202+
# In your framework's "after suite" hook:
203+
CapybaraScreenshotDiff.finalize_reporters!
204+
```
205+
206+
This generates the HTML report and prints the summary. Without this call, the gem falls back to `at_exit` which may fire before your tests finish.
207+
197208
## Installation
198209

199-
**Requirements:** Ruby 3.2+. Rails 7.1+ for Rails integration; non-Rails projects supported via `CapybaraScreenshotDiff.serve()`. For the `:vips` driver: [libvips 8.9+](https://libvips.github.io/libvips/install.html).
210+
**Requirements:** Ruby 3.2+. Rails 7.1+ for Rails integration; non-Rails projects supported via `CapybaraScreenshotDiff.serve()`. For the `:vips` driver: [libvips 8.9+](https://libvips.github.io/libvips/install.html). On macOS: `brew install vips`. On Ubuntu: `apt-get install libvips-dev`.
200211

201212
## Docs
202213

0 commit comments

Comments
 (0)