redgreen unittest with Rails 3 + Ruby 1.9.2

I cannot seem to get the redgreen gem working with Rails 3 and Ruby
1.9.2 for testing.

I've read everything I can find and can't find a clear answer. I've
tried gem install redgreen as well as gem install mynyml-redgreen.

Still no luck.

I cannot seem to get the redgreen gem working with Rails 3 and Ruby

1.9.2 for testing.

I’ve read everything I can find and can’t find a clear answer. I’ve

tried gem install redgreen as well as gem install mynyml-redgreen.

Still no luck.

Have you opened ticket with the gem’s author? This would have been my

first point of contact.

Good luck,

-Conrad

I had to configure as follows to get it working:

# Gemfile
gem 'mynyml-redgreen'

# test_helper.rb (presumably spec_helper.rb for rspec testing)
require 'redgreen'

I had to configure as follows to get it working:

Gemfile

gem ‘mynyml-redgreen’

djangst, you should be able to add it to your Gemfile as follows:

gem “redgreen”

Good luck,

-Conrad

I had to configure as follows to get it working:

Gemfile

gem ‘mynyml-redgreen’

djangst, you should be able to add it to your Gemfile as follows:

gem “redgreen”

group :development, :test do

gem ‘redgreen’

end

I've tried this too.

I get when I run "rake test"
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/
dependencies.rb:239:in `require': no such file to load -- redgreen
(LoadError)

The gem is definitely installed:

mongoid (2.0.0.beta.20)
mynyml-redgreen (0.7.1)
mysql (2.8.1)

Hi Conrad,

add it to your Gemfile as follows:
gem "redgreen"

I just tried this again and received the original error which prompted
the workaround a couple of weeks ago:

  no such file to load -- test/unit/ui/console/testrunner

Based on reading at the time it seemed to be related to dependency
issues after the switch to MiniTest in Ruby 1.9. So it works for you
on 1.9?

I guess it is a bug without a solution right now.

Hi Conrad,

add it to your Gemfile as follows:

gem “redgreen”

I just tried this again and received the original error which prompted

the workaround a couple of weeks ago:

no such file to load – test/unit/ui/console/testrunner

Based on reading at the time it seemed to be related to dependency

issues after the switch to MiniTest in Ruby 1.9. So it works for you

on 1.9?

Yes, it works for me using Ruby 1.9.2p136.

-Conrad

Did you find a solution for this?

I did, by adding the following gems to my Gemfile (development/test
group) to change the layout and colors of test results:

  gem 'term-ansicolor'
  gem 'turn'

Purge all the 'redgreen' stuff if you go this route.

You can see what it looks like here:

http://tinypic.com/r/2hmlbh3/7

djangst wrote in post #974125:

Did you find a solution for this?

I did, by adding the following gems to my Gemfile (development/test
group) to change the layout and colors of test results:

  gem 'term-ansicolor'
  gem 'turn'

Purge all the 'redgreen' stuff if you go this route.

You can see what it looks like here:

http://tinypic.com/r/2hmlbh3/7

'turn' looks clean and uncluttered.
  http://rubydoc.info/gems/turn/0.8.1/frames

Managed to make it work with the
following additions

Gemfile
  gem 'autotest-standalone', :require => 'autotest'
  gem 'autotest-rails-pure'
  gem 'term-ansicolor'
  gem 'turn'

.autotest
  require 'turn'

Just an update, I noticed that things seem to work fine without the
'term-ansicolor' gem.

Sean,

You're right, and that's confirmed here:

http://rubygems.org/gems/turn

"If you have the 'ansi' gem installed, then TURN output will be
displayed in wonderful technicolor..."

So have 'ansi' installed and just reference "gem 'turn'":

# Gemfile
group :development, :test do
  gem 'turn'
end

Thank for your confirmation djangst. :slight_smile:

An addition for windows users, to make this work, just add the following
gem to the list earlier. :slight_smile:

# Gemfile
gem 'win32console', :platforms => [:mingw]