RSpec Dispatch

RSpec Dispatch is a simple gem that replaces your default RSpec Formatter to send results from a test run to a web service of your choice. Useful to track RSpec suite results overtime through a custom web application (or endpoint).


Add this line to your application's Gemfile:

gem 'rspec_dispatch'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rspec_dispatch



To use this custom RSpec Formatter (or any custom formatter), you'll need to set it in your RSpec Config:

RSpec.configure do |config|


A variety of configuration options are available for RSpec Dispatch, some optional.
Setup your RSpec Dispatch block (similar to your RSpec.config block):

RspecDispatch.configure do |config|

Within this config block, a required parameter is "service_url" which is the endpoint that RSpec Dispatch will POST the suite/test results to.

config.service_url = ""

Other parameters include:
"verbose" - true/false (boolean) which allows text to be output within the command line when running your test suite.
"custom_data" - (hash) this allows you to dynamically add any hash values to your results before they are sent to your specific web service. Examples might include the current date, a particular build, the environment or other server details, etc...

A full configuration block could look like:

RspecDispatch.configure do |config|
    config.service_url = ""
    config.verbose = false
    config.custom_data = {author: "Kevin Wanek", date:}


When the results from your test run are sent to your web service, that endpoint will recieve a body with the following structure:


The "failures", "successes", and "pending" values will be arrays filled with data about each example that was executed during your test run. Those will be structured as follows:

    "description"=>"example test description", 


  1. Needs the ability to add authentication parameters to POST request
  2. Clean up tests
  3. Clean up the Report module (specifically the text output and the #deliver method)


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request