-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Konacha uses colorize gem as a dependency to color the "dots" to indicate the tests.
Where: /konacha-4.0.0/lib/konacha/formatter.rb
The colorize method is in conflict with the colorize method in the colored gem.
I've raised an issue with the colorize gem as well : fazibear/colorize#60
If you can work something out with the developers of that gem or if you can try to use some other gem for coloring? or anything that will resolve this conflict.
It'll be very helpful and we won't have to switch to another testing framework due to this.
Thanks.
----- For people facing this issue, here's a temporary work around. -------
To resolve the incompatibility, the only way for now is to monkey patch the Konacha formatter to disable coloring:
# Monkey patch to get around the colored - colorize gem incompatibility. Disabling colors for konacha
module Konacha
class Formatter
def color_enabled?
false
end
private
def failure_message(example)
msg = []
msg << " Failed: #{example.full_description}"
msg << " #{example.exception.message}"
msg << " in #{example.exception.backtrace.first}" if example.exception.backtrace.present?
msg.join("\n")
end
end
end
Putting this at the top of the initializer works for now.