0

I execute:

rake spec:models

and I get:

←[32m.←[0m

Finished in 0.08304 seconds
←[32m1 example, 0 failures←[0m

I haven't seen an explication for the "32m1" or "0m" anywhere. What are they?

cgf
  • 3,369
  • 7
  • 45
  • 65

1 Answers1

1

Those are ANSI escape sequences that would normally tell the console the color the output, or the background of the output.

Check out this related question for a gem you can install that will fix that: Displaying Unix color on Windows Cmd

You can read more about ANSI escape codes here.

edit

Whoops, that link for the gems actually are for separate consoles, not gems. My bad. I used to use a gem wirble, which has been replaced by a new gem called brice. You can find brice here. Looks like I also used the win32console gem, which is what did the actual conversion of the color codes to the respective console colors. My old .irbrc file looks like this:

begin
  # load wirble
  require 'wirble'
  require 'win32console'
  include Win32::Console::ANSI

  # start wirble
  Wirble.init
  Wirble.colorize
 rescue LoadError => err
   warn "Couldn't load wirble: #{err}"
end
Community
  • 1
  • 1
Zajn
  • 4,078
  • 24
  • 39