[rspec-users] Cucumber ENV setting in env.rb

aslak hellesoy aslak.hellesoy at gmail.com
Fri Jan 23 10:16:18 EST 2009

On Fri, Jan 23, 2009 at 3:40 PM, James Byrne <lists at ruby-forum.com> wrote:

> Josh Chisholm wrote:
> > We are setting environment variables in our Rakefile. We have various
> > tasks that set up environment variables, then call the cucumber task.
> > That's working for us under windows.
> Yes that makes sense. Referring to the Pickaxe book one reads that:
> "A Ruby program may write to the ENV object, which on most systems
> changes the values of the corresponding environment variables. However,
> this change is local to the process that makes it and to any
> subsequently spawned child processes. This inheritance of environment
> variables is illustrated in the code that follows. A subprocess changes
> an environment variable and this change is seen in a process that it
> then starts. However, the change is not visible to the original parent.
> (This just goes to prove that parents never really know what their
> children are doing.)"
> This does seem to indicate that the ENV setting made in in env.rb is
> visible to the cucumber process.  The inference that I draw from this is
> that env.rb is processed after the ENV setting for "CUCUMBER_COLORS" has
> already been used by cucumber and thus has no further effect on its
> behaviour.

That is correct:


(BTW, this is the ugliest code in Cucumber)


> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Aslak (::)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090123/53aa9b3f/attachment-0001.html>

More information about the rspec-users mailing list