Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gongo/turnip_formatter

A pretty formatter for Turnip
https://github.com/gongo/turnip_formatter

rspec-formatter turnip

Last synced: about 4 hours ago
JSON representation

A pretty formatter for Turnip

Awesome Lists containing this project

README

        

RSpec::Core::Formatters::TurnipFormatter
========================================

TurnipFormatter is a pretty custom formatter for [Turnip](https://github.com/jnicklas/turnip).

![CI status](https://github.com/gongo/turnip_formatter/actions/workflows/main.yml/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/gongo/turnip_formatter/badge.png?branch=master)](https://coveralls.io/r/gongo/turnip_formatter)
[![Code Climate](https://codeclimate.com/github/gongo/turnip_formatter.png)](https://codeclimate.com/github/gongo/turnip_formatter)

Requirements
--------------------

* Ruby
* `2.2.0` or later

Installation
--------------------

### RubyGems

$ gem install turnip_formatter

### Bundler

Add this line to your application's Gemfile:

```ruby
group :test do
gem 'turnip_formatter'
end
```

And then execute:

$ bundle install

Usage
--------------------

Run this command.

$ rspec -r turnip_formatter --format RSpecTurnipFormatter --out report.html

Example
--------------------

See:

- Feature and Steps
- https://github.com/gongo/turnip_formatter/tree/master/example
- Report
- http://gongo.github.io/turnip_formatter/examples/report.html

Configuration
--------------------

```ruby
TurnipFormatter.configure do |config|
config.title = 'My Report' #

My Report


config.add_stylesheet File.dirname(__FILE__) + '/foo.css' # ..
config.add_javascript File.dirname(__FILE__) + '/bar.js' # ..

config.add_stylesheet 'http://cdn.example.com/hoge.css' #
config.add_javascript '//cdn.example.com/fuga.js' #
end
```

Add-on
--------------------

* Gnawrnip
* Gnawrnip is a TurnipFormatter Add-on that provides put a screen shot to report use Capybara
* https://github.com/gongo/gnawrnip

License
--------------------

see LICENSE.txt