[rspec-users] Cucumber ENV setting in env.rb
lists at ruby-forum.com
Fri Jan 23 09:40:27 EST 2009
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
Posted via http://www.ruby-forum.com/.
More information about the rspec-users