Earlier this year, we released motion-juxtapose, a gem for using screenshots to test iOS apps built with RubyMotion. Today, we released version 0.2.0 with some bug fixes and support for Rails integration tests!
When running under Rails, the gem uses Capybara to capture its screenshots. Any Capybara driver that supports screenshot capture should work, though we’ve only tested this with Poltergeist so far.
In your spec_helper.rb
, add:
1 2 3 |
|
Now the Capybara page object will have a looks_like?(predicate)
method that can call to make screenshot assertions:
1 2 3 4 5 6 |
|
Check out all the details over at the project’s Github page and let us know what you think.