pact-foundation / pact-ruby

Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://pact.io
MIT License
2.17k stars 216 forks source link

Do not use ANSI colours when printing to non interactive terminal #19

Open bethesque opened 10 years ago

bethesque commented 10 years ago

eg.

Actual interactions do not match expected interactions for mock Media Project Revenue.
YOU54F commented 3 months ago

Reverting the following change in pact-support will fix this behaviour, but will cause some tests to fail in pact-ruby (as gha uses non interactive terminals)

https://github.com/pact-foundation/pact-support/commit/0585424a617c2aac5b0eb73ae6915087c70b3b00#diff-3df67314b1e956a19eebf4f7291abe158bf454c031522388ee504e7bd553cc2cR119

the new library we are using 'rainbow' will detect if dumb term or tty and disable colour codes from output