Hi, The problem is that 'require_relative' is actually a 'rubygem' too, and so it require 'rubygems' to be required.
If you put 'require "rubygems"' into spec_helper.rb, then 'spec_helper' will need to be loaded by 'load' method to make it work. I'm more fun of adding "require 'rubygems'" into each test file, in that case everything will work and we don't need to pollute RUBYOPT variable. Another option is to execute single test file using: bundle exec ./tests/cimi/... Bundler will then take care of loading rubygems and everything runs smoothly. What do you think? Michal Fojtik http://deltacloud.org [email protected] On Aug 2, 2012, at 4:26 AM, David Lutterkort <[email protected]> wrote: > On Wed, 2012-08-01 at 14:55 +0200, Michal Fojtik wrote: >> Hi, >> >> Seems like a missing 'require "rubygems"' for me. >> >> Do you want me to add this into all files or we are good with: >> >> export RUBYOPT="rubygems" ? > > I don't want to rely on env vars for running tests. I am thinking that > each test file should start with > > require 'require_relative' > require_relative './common' > > and then each common.rb with > > require 'require_relative' > require_relative './test_helper' > > and then require rubygems first thing in test_helper. > > That sort of setup should avoid these issues. > > David > > >
