I upgraded my application using config.gem to a Gemfile and noticed that my unit tests stopped working. This is a bit strange, and I'm not quite sure where to start looking.
When I run rake test:units --trace , I can see that my environment is being configured and lists the files that it intends to execute, but then it just returns.
It does the same if I try to run one separate file using something like: rake -I"lib:test" test/unit/foo.rb or using autotest .
Everything is very strange. As if the files are loading, but the actual unit tests are not running.
I use shoulda and fast_context , and I thought this might be a problem, but if I enable unit test using the standard def test_ syntax, it still doesn't start, so I don't think those are.
Any hints or pointers are welcome. I feel like I'm coding for the blind until I can get them to work again!
So here is where I am now:
My reasons for using bundler is to install dependencies on heroku and because I wanted to use a gem obtained from the git repository on github. Long, and especially since I removed the preinitializer for the bundle and returned to using config.gem . To get around the fact that I cannot use the github repository using config.gem , I popped my own copy in rubygems. Was it right?
Here is preinitializer.rb
begin require "rubygems" require "bundler" rescue LoadError raise "Could not load the bundler gem. Install it with `gem install bundler`." end if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24") raise RuntimeError, "Your bundler version is too old for Rails 2.3." + "Run `gem install bundler` to upgrade." end begin
I do not know how the .gems file will be useful, because it is only a hero, and I will need to search through git for it, but here is my gemfile.
source :gemcutter gem 'rails', '2.3.9' gem 'pg' gem 'minitest' gem 'RedCloth' gem 'erubis'
ruby-on-rails rake shoulda
jonnii
source share