Re: [Wtr-general] Global Variables

2006-09-01 Thread Paul Carvalho
Is it called "Duck Typing" when Ruby figures out the variables as it goes along?That totally rocks.  I only declare things as I need them in my scripts, and if my tests didn't run sequentially I would be totally screwed.  =) On 01/09/06, Chris McMahon <[EMAIL PROTECTED]> wrote: Perl forces you to u

Re: [Wtr-general] Global Variables

2006-09-01 Thread Chris McMahon
 A local variable at "top level" in Python had the samecontext whether in the shell, in the current file being executed or in another file being loaded. These are all different contexts in Ruby, andi try to encourage testers early on to be able to trust that codeexecuted in any of these ways will d

Re: [Wtr-general] Global Variables

2006-09-01 Thread Phlip
Bret Pettichord wrote: > I concur with this advice. I usually teach global variables first (these > start with "$") I though test rigs that drove IE had the extra burden of building and breaking down the entire iexplore.exe object stack once per test case. So I thought that some Watirists would m

[Wtr-general] Global Variables

2006-09-01 Thread Bret Pettichord
Paul Carvalho wrote: > I hardly think that bringing up the difference between global and > instance variables to someone who doesn't know how to start IRB is a > good idea right now. I think you should follow your own advice and > keep things simple right now. > > I don't consider myself a newb

Re: [Wtr-general] Global variables

2005-12-12 Thread carl . l . shaulis
Thanks for the replies! I had tried what Dara suggested and it did not work. Well the lesson is that if you do not type the variable names correctly it will never work! Dara - Thanks for forcing me to peer review my code! :0) Also thanks for the other replies. Carl

Re: [Wtr-general] Global variables

2005-12-12 Thread Bret Pettichord
At 12:43 PM 12/12/2005, [EMAIL PROTECTED] wrote: >What is the most efficient way in watir to have most files use the same >global variables? Define/assign all your global variables in setup.rb, like this: $foo = 'bar' At the top of each of your tests, do this: require 'setup' That's how th

Re: [Wtr-general] Global variables

2005-12-12 Thread Dara Lillis
[EMAIL PROTECTED] On Behalf Of Bill Agee Sent: Monday, December 12, 2005 2:15 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Global variables There are probably a couple of ways to do this, but here's one suggestion (which may not be the cleanest): If you're going to use s

Re: [Wtr-general] Global variables

2005-12-12 Thread Bill Agee
sage- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Monday, December 12, 2005 10:44 AM > To: wtr-general@rubyforge.org > Subject: [Wtr-general] Global variables > > Good afternoon: > > I am looking for a means to s

[Wtr-general] Global variables

2005-12-12 Thread carl . l . shaulis
Good afternoon: I am looking for a means to set some global variables and pass them on to other scripts. I was attempting to set some global variables in a file similar to the "all_test.rb" or the "setup.rb". I would like all scripts called from setup.rb to use these global variables. It i