On Oct 14, 7:49 pm, Nick <[EMAIL PROTECTED]> wrote:
> On Oct 14, 2:34 pm, Frederick Cheung <[EMAIL PROTECTED]>
> wrote:
>
> > On Oct 14, 7:22 pm, Nick <[EMAIL PROTECTED]> wrote:> On Oct 14, 2:14 pm,
> > Frederick Cheung <[EMAIL PROTECTED]>
> > > wrote:
>
> > > Why is the development environment loaded before the test environment?
>
> > Because the first thing that rake test does is clone the development
> > database. Were you to run just one test (ie ruby test/unit/
> > foo_test.rb) you wouldn't see the dev environment loaded.
>
> > Fred
>
> I see. That explains things a bit now.
>
> With that in mind, how would you configure a plugin to be loaded only
> in the development environment, and not in the test environment? Since
> running a suite of tests first jumps into the development environment,
> I'm not sure how to go about this.
>
you could certainly bracket the body of your init.rb with "if
RAILS_ENV ==" and do nothing if not (except perhaps remove your
plugin's lib directory from the load path)
Fred
> Cheers,
> Nick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---