Gnawrnip
Gnawrnip is a TurnipFormatter Add-on that provides put a screenshot (like animation gif) to report use Capybara
IMPORTANT!
This project is currently in development (frequent releases). So it have potential for massive refactorings (that could be API breaking).
Requirements
- Ruby
~> 1.9.3
~> 2.0.0
- RubyGems
- capybara
~> 2.1.0
- turnip_formatter
- capybara
Installation
Add this line to your application's Gemfile:
gem 'gnawrnip'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gnawrnip
Setup
In your test setup file add:
require 'gnawrnip'
Gnawrnip.ready!
Customization
You can do to customize a screenshot.
Gnawrnip.configure do |c|
c.make_animation = true
c.max_frame_size = 1024 # pixel
end
make_animation
(Boolean) Whether to make animation GIF. (Default: true)max_frame_size
(Integer) Maximum size that use to resize of image.-
If given, it resize the image to fit to this value.
-
Ignored if this value is greater than original width and height.
-
Example:
original: 640x480 this value: 300 result : 300x225 original: 480x640 this value: 400 result : 300x400
-
As example, see example/spec/spec_helper.rb .
Example
see https://github.com/gongo/gnawrnip/tree/master/example
License
MIT License. see LICENSE.txt