Can't install new theme of pry-theme

18 views Asked by At

I'm on an old laptop learning rspec.

What I really want to do is change the color of red from the rspec --color results, because I can't read it on this old screen (the rspec version is concurrent with the effective rspec 3 book, about halfway up the version list). i'm using rvm.

anyway, I got into pry theme somehow, which changed the color of binding.pry, but not the rspec --colors. so now i'm randomly trying to install another theme, using

pry-theme install autumn

but am getting

[1] pry(#<RSpec::ExampleGroups::ACupOfCoffee::WithMilk>)> pry-theme install autumn
Installing "autumn" from Pry Theme Collection...
NameError: uninitialized constant Pry::Helpers::Platform
Did you mean?  RUBY_PLATFORM
from /home//gems/pry-theme-1.3.1/lib/pry-theme/commands.rb:230:in `json_body'

any suggestions? also, any suggestion to changing the rspec colors?

EDIT

I don't think the project rspec is reading the .rspec file, because the .rspec file has the line "--color" but I don't get color unless I do --color in terminal. anyway, I added

RSpec.configure do |c|
  # Each of these can be one of the ANSI color code integers or one
  # of [:black, :white, :red, :green, :yellow, :blue, :magenta, :cyan].
  # The values I've assigned here are the defaults so you'll want to change them.

  # Color config is available in RSpec 2.13+. Since this file will
  # always be loaded by RSpec and you may have projects on earlier
  # versions, it's a good idea to only do this on versions that support it.
  if c.respond_to?(:default_color=)
    c.default_color = :white
    c.detail_color  = :cyan
    c.failure_color = :magenta
    c.fixed_color   = :blue
    c.pending_color = :yellow
    c.success_color = :green
  end
end

to an .rb file in the project folder, and added

--require "configure_rspec_colors.rb"

to .rspec in the project folder, but nothing is happening.

0

There are 0 answers