rspecでのテストがちょっと楽しくなるgem、nyan-cat-formatterを導入する

テストの待ち時間&結果確認がちょっと楽しくなるgemです。

GitHub - mattsears/nyan-cat-formatter: Nyan Cat inspired RSpec formatter!

導入手順

Gemfileに「nyan-cat-formatter」を追加

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'rspec-rails'
  # Test format nyan cat
  gem 'nyan-cat-formatter'
end

gemをインストール

$ bundle install --path vendor/bundle --jobs=4
$ # .bundle/configに設定されている場合はbundleでOK

使い方

オプションをつけてrspecを実行!!

$ bundle exec rspec --format NyanCatFormatter spec/

すると… f:id:maetoo11:20160407155537p:plain

※テスト実行中はNyan Catが走ります

テストが落ちると… f:id:maetoo11:20160407155851p:plain