Chuck,

Thanks you very much.

-Keith

On Thu, Apr 9, 2009 at 8:51 PM, Chuck van der Linden <sqa...@gmail.com>wrote:

>
> If the code inside the steps is not the same, and you can't figure out
> a way to make it universal, then rename one or both of the steps (and
> alter the features that call it)
>
>  e.g. if the code is page specific, then maybe "Given On the xxx page
> I am on the properties tab" or something of that sort.
>
> If the code inside the steps is the same, remove one of them.  Part of
> the idea of Cucumber is being able to re-use steps, so there's no need
> to have the same step in two places.  Where you put the steps (in
> terms fo what step file you use)  is up to you, you could for example
> create a 'common_step" file, or group by functionality.
>
> You might want to read this:
> http://wiki.github.com/aslakhellesoy/cucumber/step-organisation
> and also THIS as well:
> http://wiki.github.com/aslakhellesoy/cucumber/feature-coupled-steps-antipattern
> which talks a little about what you want to avoid.
>
>  Also be aware that the very latest edition of the framework (0.4.5 as
> I write this) now allows you to install and use later versions of
> cucumber, which means you get to use <drum roll please> :
> http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines as
> well as a host of other nifty features like pending steps, etc.
>
> (and there was much rejoicing)
>
> --Chuck
>
> On Apr 9, 11:54 am, keith shaw <keithsha...@gmail.com> wrote:
> > I have recently started to use watircraft to organize my test cases.  I
> > really like the benefits watircraft provides when trying to manage and
> scale
> > a large number of test.  The problem I am having is I have two test each
> > with the same GIVEN in the feature.  This was never a problem in the past
> > because of the directory structure used in cucumber.  Now when I run all
> the
> > test at once using 'rake features' I get the following error :
> >
> > lib/steps/binding_type_steps.rb:6:in `/^I am on the properties tab$/'
> > lib/steps/trim_size_steps.rb:6:in `/^I am on the properties tab$/'
> >
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.­rb:91:in
> > `each'
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.­rb:91:in
> > `Given'
> >     from ./lib/steps/trim_size_steps.rb:6
> >     from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
> > `gem_original_require'
> >     from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
> > `polyglot_original_require'
> >     from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
> > `require'
> >     from
> >
> /Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/depe­ndencies.rb:156:in
> > `require'
> >     from
> >
> /Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/depe­ndencies.rb:521:in
> > `new_constants_in'
> >     from
> >
> /Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/depe­ndencies.rb:156:in
> > `require'
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­76:in
> > `require_files'
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­74:in
> > `each'
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­74:in
> > `require_files'
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­34:in
> > `execute!'
> >     from
> >
> /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­20:in
> > `execute'
> >     from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
> > rake aborted!
> > Command failed with status (1):
> > [/System/Library/Frameworks/Ruby.framework/...]
> >
> > Does anyone have any idea how I can solve this issue?
> >
> > -Keith
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to