-_-_-_-_-_-_-_,------, _-_-_-_-_-_-_-| /\_/\ -_-_-_-_-_-_-~|__( ^ .^) _-_-_-_-_-_-_-"" ""
This is my take on the Nyan Cat RSpec Formatter. It simply creates a rainbow trail of test results. It also counts the number of examples as they execute and highlights failed and pending specs.
The rainbow changes colors as it runs. See it in action here.
Works with RSpec 1.3 and RSpec 2.
Using Nyan Cat
You can either specify the formatting when using the
rspec --format NyanCatFormatter
--format NyanCatFormatter to a
.rspec file placed in your project's root directory,
so that you won't have to specify the
--format option everytime you run the command.
Using with Bundler
To use Nyan Cat with a project that uses Bundler (Rails or Sinatra f.e.) you need to add Nyan Cat dependecy to your Gemfile:
group :test do gem "nyan-cat-formatter" end
And then run
$ gem install nyan-cat-formatter
If you want to use Nyan Cat as your default formatter, simply put the options in your .rspec file:
Playing the Nyan Cat song
You can then enjoy playback in two ways:
1. Play the song only when desired using a command line option:
Use the following command to run your specs:
$ rspec spec -f NyanCatMusicFormatter
And enjoy the site of Nyan Cat running across your terminal to the Nyan Cat song!
2. Play the song by default when you run your specs:
Make sure your .rspec file in your application's root directory contains the following:
--color --format NyanCatMusicFormatter
rspec spec and enjoy Nyan Cat formatted text output accompanied by the Nyan Cat song by default!
This currently only works on Mac OS X or on Linux (if you have mpg321 or mpg123 installed).
Once you've made your great commits:
- Fork Nyan Cat
- Create a topic branch - git checkout -b my_branch
- Push to your branch - git push origin my_branch
- Create a Pull Request from your branch
- That's it!
Matt Sears :: @mattsears