On Fri, Jan 16, 2009 at 3:19 PM, David Chelimsky <dchelim...@gmail.com>wrote:

> >>
> >> I run rspec on my dev machine, but obviously not on my production
> >> machine, what would be the nicest way to handle such scenario? At the
> >> top of rspec.rake I could add a check on the environment
> >
> > That would get my vote.
>
> Unless I"m missing something, that would require this on the CLI:
>
>  RAILS_ENV=test rake spec
>
> Therefore, this would not get my vote :)
>

Because the rake tasks get loaded before the spec task has a chance to set
RAILS_ENV. But the rakefile wouldn't check RAILS_ENV=test, but
RAILS_ENV=production (or staging). And wouldn't it be set that way before
rake loads its files? (I'm gonna learn something here, whether I want to or
not!)

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to