Dots are boring, improve green tests with floral designs rspec formatter

Make your rspec output look more interesting!
(yes we had too much spare time at our hands… 😀 )

# spec/spec_helper.rb
# encoding: UTF-8

if defined? RSpec::Core::Formatters::ProgressFormatter
  RSpec::Core::Formatters::ProgressFormatter.class_eval do
    DOTS = ['☘','⚘']
    def example_passed(example)
      output.print green(DOTS[rand(DOTS.size)])
    end
  end
end

One thought on “Dots are boring, improve green tests with floral designs rspec formatter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s