[rspec-users] rake spec loads development environment
Jonathan Linowes
jonathan at parkerhill.com
Tue Aug 19 17:35:21 EDT 2008
On Aug 19, 2008, at 5:08 PM, Jonathan Linowes wrote:
>
> On Aug 19, 2008, at 4:32 PM, Satish Gunnu wrote:
>
>> Yes I think that is what's happening in my case. is this how it is
>> supposed to work? or can we have rspec ignore the step to look at
>> development environment. thanks so much for all your help.
>
> you'll notice that vendor/plugins/rspec-rails/rspec.rake contains
> the line
>
> spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config',
> 'database.yml')) ? "db:test:prepare" : :noop
>
> which you could change or comment out
note, I ran into this wanting to run through my specs on my
production server, which doesnt have a development environment but
does have a production one. So instead I run (via a cap deploy:spec
task i wrote)
rake spec RAILS_ENV=production
that way the db:test:prepare uses the production db rather than the
development one
>
>>
>>
>>> iirc, it looks at the development environment to prepare the db
>>> schema, but still runs the specs in test. Is that what you're
>>> seeing?
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
More information about the rspec-users
mailing list