0
votes

So I have these gems for dev:

  gem 'autotest'
  gem 'ZenTest'
  gem 'autotest-growl'

In my .autotest file:

require 'active_support'
require 'active_support/core_ext'
require 'autotest/restart'
require 'redgreen/autotest'


begin
  require 'autotest/growl'
rescue LoadError
  warn "Error loading autotest/growl. Run '[sudo] gem install autotest-growl' first."
end

 Autotest::Growl::show_modified_files = false
 Autotest::Growl::hide_label = true
 Autotest::Growl::remote_notification = true

Autotest.add_hook :initialize do |at|
  %w{.git .svn .hg .DS_Store ._* log}.each {|exception|at.add_exception(exception)}
end

If i run with require 'redgreen/autotest' or 'autotest/redgreen', I get these erros:

C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/lib/autotest.rb:419:in `run_tests'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/lib/autotest.rb:394:in `get_to_green'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/lib/autotest.rb:367:in `block in run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/lib/autotest.rb:365:in `loop'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/lib/autotest.rb:365:in `run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/lib/autotest.rb:248:in `run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/ZenTest-4.11.1/bin/autotest:6:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/bin/autotest:22:in `load'
C:/RailsInstaller/Ruby2.3.3/bin/autotest:22:in `<main>'
Quitting

I tried also with kule/redgreen gem, but nothing? If I run rspec separately it has colors. Tried it on multiple terminals, installed ansi etcetera.

Edit 1: My gemfile https://gist.github.com/bbtdev/2c511c4741749db7fbffb02b6d72d9ad

Edit 2: I also have a app/autotest/discovery.rb with Autotest.add_discovery { "rspec" } My rspec version is 3.7

Edit 3: I installed

gem 'rspec-autotest' gem 'autotest-rails'

And when trying to add require 'redgreen/autotest' or require 'redgreen/autotest' unless ENV['RSPEC'] it gives me

bundler: command not found: C:\RailsInstaller\Ruby2.3.3\bin\ruby -rrubygems -e require

1
can you put up your gem file ?Chetan Datta
Yes, on a gist is okay?user8217653

1 Answers

0
votes

Try changing,

require 'redgreen/autotest'

to

require 'redgreen/autotest' unless ENV['RSPEC']

in your .autotest file.