I believe you need to turn off code ray, as it’s colouring the snippets? Jon Rowe --------------------------- [email protected] jonrowe.co.uk
On Friday, 15 September 2017 at 15:06, Dylan Reichstadt wrote: > Hey All, > > I'm trying to export data from RSpec, including the failing lines of code. In > the FailedExampleNotification > (http://www.rubydoc.info/gems/rspec-core/RSpec/Core/Notifications/FailedExampleNotification), > I noticed there were two methods: > message_lines > colorized_message_lines. > Despite the name differences, both of these methods look to return ANSI color > characters, with message_lines slightly less (see below). I was expecting > colorized_message_lines to do that, but not message_lines. > > Is there a public method that exposes this data without the ANSI? I'll look > to regex them out, but if there's another method that's more reliable, I > would love to know. > > Thanks! > > RSpec Version: 3.6.0 > > > notification.message_lines > => ["Failure/Error: \e[0m\e[1;34;4mTestClass\e[0m.test_method", > " expected to find css \"thisisatest\" but there were no matches"] > > notification.colorized_message_lines > => ["\e[31mFailure/Error: \e[0m\e[1;34;4mTestClass\e[0m.test_method\e[0m", > "\e[31m expected to find css \"gjiegeij\" but there were no matches\e[0m"] > > > -- > You received this message because you are subscribed to the Google Groups > "rspec" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > (mailto:[email protected]). > To post to this group, send email to [email protected] > (mailto:[email protected]). > To view this discussion on the web visit > https://groups.google.com/d/msgid/rspec/3f5fd029-9bed-4dde-bac5-f76fe0d9ce9c%40googlegroups.com > > (https://groups.google.com/d/msgid/rspec/3f5fd029-9bed-4dde-bac5-f76fe0d9ce9c%40googlegroups.com?utm_medium=email&utm_source=footer). > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/D28CBFD856B5497D9AEE43AB2662F54F%40jonrowe.co.uk. For more options, visit https://groups.google.com/d/optout.
