aidy lewis
2009-Feb-25 10:52 UTC
[rspec-users] [Cucumber] Enforce a skip on a non-implemented step
Hi, When we create step defintions. For example: When /^that data is loaded$/ do end The above is seen in the Cucucmber run as implemented. Is it possible to put something within this method to enforce a skip flag? Aidy
aslak hellesoy
2009-Feb-25 11:41 UTC
[rspec-users] [Cucumber] Enforce a skip on a non-implemented step
On Wed, Feb 25, 2009 at 11:52 AM, aidy lewis <aidy.lewis at googlemail.com> wrote:> Hi, > > When we create step defintions. For example: > > When /^that data is loaded$/ do > > end > > The above is seen in the Cucucmber run as implemented. > > Is it possible to put something within this method to enforce a skip flag? >I''m not sure I understand what you mean. You want to skip running certain step definitions if a certain condition is true? When /^that data is loaded$/ do unless ENV[''MAGIC''] # load the data end end $ MAGIC=true cucumber ... Aslak> Aidy > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- Aslak (::)
Joseph Wilk
2009-Feb-25 12:33 UTC
[rspec-users] [Cucumber] Enforce a skip on a non-implemented step
aidy lewis wrote:> Hi, > > When we create step defintions. For example: > > When /^that data is loaded$/ do > > end > > The above is seen in the Cucucmber run as implemented. > > Is it possible to put something within this method to enforce a skip flag? >Do you mean something like the ''pending'' function but it instead marks the step as skipped? When /^that data is loaded$/ do skip end> Aidy > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >-- Joseph Wilk http://blog.josephwilk.net
Josh Knowles
2009-Feb-25 14:23 UTC
[rspec-users] [Cucumber] Enforce a skip on a non-implemented step
On Wed, Feb 25, 2009 at 5:52 AM, aidy lewis <aidy.lewis at googlemail.com> wrote:> Hi, > > When we create step defintions. For example: > > When /^that data is loaded$/ do > > endAre you familiar with the "pending" method? i.e. When /^that data is loaded$/ pending end
aidy lewis
2009-Feb-25 15:23 UTC
[rspec-users] [Cucumber] Enforce a skip on a non-implemented step
Hi Josh et al On 25/02/2009, Josh Knowles <joshknowles at gmail.com> wrote:> On Wed, Feb 25, 2009 at 5:52 AM, aidy lewis <aidy.lewis at googlemail.com> wrote: > > Hi, > > > > When we create step defintions. For example: > > > > When /^that data is loaded$/ do > > > > end > > > > Are you familiar with the "pending" method? > > i.e. > > > When /^that data is loaded$/ > > pending > end > > _______________________________________________I was not familiar, but it is exactly what I needed. Thanks Aidy