TurnipFormatter is a pretty custom formatter for Turnip.
- Ruby
2.2.0
or later
$ gem install turnip_formatter
Add this line to your application's Gemfile:
group :test do
gem 'turnip_formatter'
end
And then execute:
$ bundle install
Run this command.
$ rspec -r turnip_formatter --format RSpecTurnipFormatter --out report.html
See:
- Feature and Steps
- Report
TurnipFormatter.configure do |config|
config.title = 'My Report' # <h1>My Report</h1>
config.add_stylesheet File.dirname(__FILE__) + '/foo.css' # <style>..</style>
config.add_javascript File.dirname(__FILE__) + '/bar.js' # <script>..</script>
config.add_stylesheet 'http://cdn.example.com/hoge.css' # <link rel="..">
config.add_javascript '//cdn.example.com/fuga.js' # <script src="..">
end
- Gnawrnip
- Gnawrnip is a TurnipFormatter Add-on that provides put a screen shot to report use Capybara
- https://github.com/gongo/gnawrnip
see LICENSE.txt