From: Josh Cheek Date: 2011-06-28T12:22:50+09:00 Subject: How to test code that behaves conditionally based on gem existence? --bcaec54ee864ad9f4004a6bd2e12 Content-Type: text/plain; charset=ISO-8859-1 Working on https://rubygems.org/gems/bundler-bouncer, the problem is it uses ANSI escape sequences to colour the output, which doesn't work on Windows. I've seen some gems that will use term-ansicolor to colour the output, if it is present, and otherwise won't use it. That seemed easier than trying to detect whether we were on Windows or not, but I still can't figure out how to test something like that. Everything I've thought of has gotten really ugly really quick. Any suggestions? --bcaec54ee864ad9f4004a6bd2e12--