Post in Japanese here
Installation and Usage
$ gem install turnip_formatter
$ echo 'gem "turnip_formatter'" >> Gemfile $ bundle install
And run this line.
$ bundle exec rspec -r turnip_formatter --format RSpecTurnipFormatter --out report.html
Built-in formatter is hard to see.
e.g. turnip examples.
$ git clone git://github.com/jnicklas/turnip.git $ cd turnip $ bundle install --path vendor/bundle $ buddle exec rspec examples -f html -o test.html -f documentation -o test.txt
$ less test.txt
(skip..) Steps for a feature Evil the monster has an alignment -> that alignment should be "Evil" Neutral the monster has an alignment -> that alignment should be "Neutral" Red Dragons are deadly there is a dragon -> there is a knight -> the dragon attacks the knight -> the knight is alive there is a dragon -> the dragon breathes fire -> there is a knight -> the dragon attacks the knight -> the knight is dead
Horizon eye movement is tiring because each step connected by
-> are display
3) raises errors Incorrect expectation there is a monster -> it should die Failure/Error: Then it should die expected: 0 got: 1 (compared using ==) # examples/steps/steps.rb:14:in `block in <top (required)>' # ./lib/turnip/execute.rb:20:in `step' # ./lib/turnip/rspec.rb:44:in `run_step' # ./lib/turnip/rspec.rb:70:in `block (6 levels) in run' # ./lib/turnip/rspec.rb:69:in `each' # ./lib/turnip/rspec.rb:69:in `block (5 levels) in run' # ./examples/errors.feature:8:in `it should die'
I can't understand easily about where scenario failed. (I can only see backtrace...)
Next, HTML Format.
$ open test.html
Code display of failed step is good. But previous problem is not resolved
$ echo 'gem "turnip_formatter"' >> Gemfile $ bundle install $ bundle exec rspec examples -r turnip_formatter -f RSpecTurnipFormatter -o report.html
Very so good!!
You can be found here demo.
I setting save and display this report on Jenkins.