Code Monkey home page Code Monkey logo

rspec_reports_formatter's Introduction

PLEASE NOTE - This project is not being actively maintained at the moment - I am taking a break - not sure when I will return.

Publish pretty rspec reports

This is a ruby Rspec custom formatter which generates pretty html reports showing the results of rspec tests. This gem was build to use Rspec 3.x.x If you want to use it with older versions of Rspec then you should use the rspec_reports_formatter 0.2.x (2.8.0 branch)

  • For Rspec 2.x.x please use rspec_reports_formatter version starting with 0.2.x
  • For Rspec 3.x.x please use the rspec_reports_formatter version starting with 0.3.x

Install

  gem install rspec_html_formatter -v 0.3.1

ideally just add it to your bundler Gemfile as follows:

 gem 'rspec_html_formatter','~> 0.3.1'

Use

When running your rspec tests with rspec 3.0.0 just use the custom formatter:

This should work:

 rspec -f RspecHtmlFormatter spec

If not you can explicitly add in a require as follows:

 rspec --require rspec_html_formatter.rb --format RspecHtmlFormatter spec

![example overview report] (https://raw.githubusercontent.com/kingsleyh/rspec_reports_formatter/master/.README/rspec_reports_overview.png)

![example report] (https://raw.githubusercontent.com/kingsleyh/rspec_reports_formatter/master/.README/rspec_reports_report.png)

If you want to provide some generated documentation for the tests you can put comments in the rspec tests like this:

  #-> Given I have ordered a vegetarian pizza
  #-> When I eat the pizza
  #-> Then my tummy is full

The #-> notation is picked up and passed through a Gherkin syntax highlighter. So it was designed to use with Given,When,Then. But in theory you can put other text there too.

rspec_reports_formatter's People

Contributors

kingsleyh avatar

Watchers

Reddy Reddy Harish Reddy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.