Closed AlexBaranosky closed 12 years ago
I've got a decent looking colorized version of the report code, cake summary and lein-plugin summary, but no way for the user to turn it on or off. I'm not sure if we need that feature, or if colors should just be the only option. I've got it on a local branch... Let me know what you think.
Ideas based on IRC chat with Alan Malloy and Chris Granger, on the subject of how to best go about making the colorization togglable:
you might take a hint from lein and use an environment variable, like:
MIDJE_COLOR=false
The JVM does not have a simple way to set an environment variable. IT can read one, but can't set one (without a crazy hack).
Two options I can think of:
I plan to go with option 2. Let me know if it stinks. :)
Pushed code to make FAIL lines red, and WORK TO DO lines yellow in the shell. This can be turned off by setting the environment variable MIDJE_COLORIZE=FALSE
. Next to do is to edit the cake plugin code to make ">>> clojure.test summary:" and ">>> Midje summary:" both be green. (plan to make same change to lein-midje)
Seems like a good idea. I'm still wondering: What's a sane way to allow the user to opt-out of colorization?