Project

gnawrnip

0.02
Low commit activity in last 3 years
A long-lived project that still receives updates
Gnawrnip is a TurnipFormatter Add-on that provides put a screen shot to report use Capybara
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Gnawrnip

Gnawrnip is a TurnipFormatter Add-on that provides put a screenshot (like animation gif) to report use Capybara

Build Status Coverage Status Code Climate Dependency Status

IMPORTANT!

This project is currently in development (frequent releases). So it have potential for massive refactorings (that could be API breaking).

Requirements

  • Ruby
    • 2.2.0 or higher
  • RubyGems
    • capybara ~> 2.1.0
    • turnip_formatter

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