Colorized output for Cedar

December 23, 2010 Adam Milligan

Thanks to Sean Moon and Sam Coward Cedar now has colorized output on the command line:

Colorized Cedar report

If you’d like to display colorized output like this you can specify the appropriate custom reporter class using the CEDAR_REPORTER_CLASS environment variable. We do this in our Rakefiles, like so:

task :specs => :build_specs do
  ENV["DYLD_FRAMEWORK_PATH"] = BUILD_DIR
  ENV["CEDAR_REPORTER_CLASS"] = "CDRColorizedReporter"
  system_or_exit(File.join(BUILD_DIR, SPECS_TARGET_NAME))
end

You can set the environment variable in whatever way works for you. You can also set it to any reporter class you choose, so customize away.

About the Author

Biography

More Content by Adam Milligan
Previous
Winemaking: A Donkey and Goat
Winemaking: A Donkey and Goat

Vintner Jared Brandt was a technical product manager before the first dot-com crash. He and his wife spent ...

Next
Extreme Pairing
Extreme Pairing

Given the recent interest and discussions around pair programming, I thought that now would be a good time ...

Enter curious. Exit smarter.

Register Now