I think I have figured out where the problem resides now I need to figure 
out how to fix the problem:

Let me explain...

So my folder structure is as follows:

-features
  - support
    - env.rb (this is the main one where I require gems and ahve the 
environment settings etc...)
  - functional_area_one
    - step_definitions
      - *.rb
    - support
      - env.rb (I only have one line in here which 
is: Dir["features/support/env.rb"].each {|file| require file } 
    - *.feature
  - functional_area_two
    - step_definitions
      - *.rb
    - support
      - env.rb (I only have one line in here which 
is: Dir["features/support/env.rb"].each {|file| require file } 
    - *.features
-lib (utils and page objects sit in here)

So I have split my feature files out into different functional areas. 
therefore creating sub folders. Now because of the way cucumber is, I have 
created an env.rb file for each folder. But instead of cut and pasting all 
the code into multiple env.rb files, I have just re-directed it to point to 
the main one where all the configuration, requiring etc... takes place.

I think, because of this, when the env.rb file is called twice. Once 
originally and then for the second time when the env.rb file points it back 
to the main one.

Therefore causing it invoke the browser twice because two calls are being 
made at separate times in the set up.

Is there a more elegant solution as to how I can layout my folders? Or 
shall i add all the details into each and every env.rb file?

kind regards,
Knoll

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to