[rspec-users] [RSpec] Setting a gem dep on rspec-rails
nick at deadorange.com
Sat Feb 7 12:33:32 EST 2009
On 07/02/2009, at 12:30 PM, Nick Hoffman wrote:
> For a while now, I've had the following in config/environment.rb :
> config.gem 'haml'
> config.gem 'rspec', :lib => 'spec'
> config.gem 'rspec-rails', :lib => 'spec/rails'
> I just tried running the Rails console in production mode, and this
> warning occured:
> irb: warn: can't alias context from irb_context.
> After some googling, I learned that the gem deps on rspec and rspec-
> rails are causing that warning. When I remove those two gem deps
> from environment.rb , the warning disappears.
> With that said, I'm wondering what the accepted way to setup gem
> dependencies on rspec and rspec-rails is. Should one not bother?
> Should the "config.gem" lines go in config/environments/test.rb ?
I should've tried the second solution I proposed before sending that
email. If you put the gem dependencies in config/environments/test.rb
and then enter the Rails console in test mode (script/console test),
the warning occurs.
More information about the rspec-users