>
> > Rails::Initializer.run do |config|
> > (...)
> > config.gem "rspec", :version => ">= 1.2.8", :lib => 'spec'
> > config.gem "rspec-rails", :version => ">= 1.2.7.1", :lib => 'spec/
>
> Use lib => false to keep rails from automatically loading rspec and/or
> rspec-rails
>
> This should also be in config/environments/test.rb
>
> HTH,
> David
>
Ok, I now have the following lines in my environment.rb:
config.gem "rspec", :version => ">= 1.2.6", :lib => false
config.gem "rspec-rails", :version => ">= 1.2.6", :lib => false
And these in my environments/test.rb:
config.gem "rspec", :lib => 'spec'
config.gem "rspec-rails", :lib => 'spec/rails'
Indeed, that solves the original problem of forcing the test
environment when running the server. I refrained from specifying the
version in the test.rb file since that would be a violation of DRY. I
am not 100% satisfied since I still have to define the gems in two
places, but this is now a minor issue and I don't see an easy way to
fix it.
Thank you for your help, David.
Bálint
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users