Hi Guys, Things are working great with Cucumber and am getting better at expressing requirements as behaviors. Kudos! I seek a couple of points of clarification, or confirmation, if someone has a minute or two... FWIW - I''ve read the wiki and the given-when-then page and just seek confirmation: There is no dependency implied in the keywords "given", "then" and "when" (as well as "and" and "but), correct? These are simply naming conventions that denote the well known "Build/Operate/Check" pattern but have no real physical relationship, they''re just tags that denote the steps. A "pending" step is any step that has a matching step but nothing is implemented. A "successful" step is any step that is matched, has some code and doesn''t assert anything resolving to false. A "gray" out step means that no steps were found that matched the feature. You need to be careful that features do not match steps in the step file or cucumber will execute the first step it finds that matches (really don''t know how this works, will a test sequence ever go ''backwards''?) Going back and changing the stuff in the .feature file is risky as it''s very easy to create a mismatch and the step won''t be found. Thanks very much, Tim
David Chelimsky
2008-Dec-17 21:22 UTC
[rspec-users] [Cucumber] a few clarifications please...
On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote:> Hi Guys, > > Things are working great with Cucumber and am getting better at > expressing requirements as behaviors. Kudos! > > I seek a couple of points of clarification, or confirmation, if > someone has a minute or two... > > FWIW - I''ve read the wiki and the given-when-then page and just seek > confirmation: > > There is no dependency implied in the keywords "given", "then" and > "when" (as well as "and" and "but), correct? These are simply naming > conventions that denote the well known "Build/Operate/Check" pattern > but have no real physical relationship, they''re just tags that denote > the steps.Correct.> A "pending" step is any step that has a matching step but nothing is > implemented.Correct.> A "successful" step is any step that is matched, has some code and > doesn''t assert anything resolving to false.Or raise an error.> A "gray" out step means that no steps were found that matched the feature.Blue? Means that a step was found, but a previous step was either pending or failed.> You need to be careful that features do not match steps in the step > file or cucumber will execute the first step it finds that matches > (really don''t know how this works, will a test sequence ever go > ''backwards''?)Cucumber tells you when it finds two steps definitions that could match the step in the feature.> Going back and changing the stuff in the .feature file is risky as > it''s very easy to create a mismatch and the step won''t be found.Not sure why that is risky, unless you mean that there are non-developers making these changes. If so, then they should probably be made collaboratively.> > Thanks very much, > > Tim > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Thank you David. This helps a lot. Question, if there are matching steps...will cucumber find the first matching step during execution? I noticed a test executing at higher line numbers and then picking up a step with a lower line number. Thanks again, Tim On Wed, Dec 17, 2008 at 2:22 PM, David Chelimsky <dchelimsky at gmail.com> wrote:> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: >> Hi Guys, >> >> Things are working great with Cucumber and am getting better at >> expressing requirements as behaviors. Kudos! >> >> I seek a couple of points of clarification, or confirmation, if >> someone has a minute or two... >> >> FWIW - I''ve read the wiki and the given-when-then page and just seek >> confirmation: >> >> There is no dependency implied in the keywords "given", "then" and >> "when" (as well as "and" and "but), correct? These are simply naming >> conventions that denote the well known "Build/Operate/Check" pattern >> but have no real physical relationship, they''re just tags that denote >> the steps. > > Correct. > >> A "pending" step is any step that has a matching step but nothing is >> implemented. > > Correct. > >> A "successful" step is any step that is matched, has some code and >> doesn''t assert anything resolving to false. > > Or raise an error. > >> A "gray" out step means that no steps were found that matched the feature. > > Blue? Means that a step was found, but a previous step was either > pending or failed. > >> You need to be careful that features do not match steps in the step >> file or cucumber will execute the first step it finds that matches >> (really don''t know how this works, will a test sequence ever go >> ''backwards''?) > > Cucumber tells you when it finds two steps definitions that could > match the step in the feature. > >> Going back and changing the stuff in the .feature file is risky as >> it''s very easy to create a mismatch and the step won''t be found. > > Not sure why that is risky, unless you mean that there are > non-developers making these changes. If so, then they should probably > be made collaboratively. > >> >> Thanks very much, >> >> Tim >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
David Chelimsky wrote:> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: > >> Hi Guys, >> >> Things are working great with Cucumber and am getting better at >> expressing requirements as behaviors. Kudos! >> >> I seek a couple of points of clarification, or confirmation, if >> someone has a minute or two... >> >> FWIW - I''ve read the wiki and the given-when-then page and just seek >> confirmation: >> >> There is no dependency implied in the keywords "given", "then" and >> "when" (as well as "and" and "but), correct? These are simply naming >> conventions that denote the well known "Build/Operate/Check" pattern >> but have no real physical relationship, they''re just tags that denote >> the steps. >> > > Correct. > > >> A "pending" step is any step that has a matching step but nothing is >> implemented. >> > > Correct. >In the latest version in Github (0.1.13) you can also force steps which have an implementation to the pending state using the ''pending'' method which works in the same way as Rspec''s pending. When "I want to be lazy" do pending "Implement me!" end -- Joseph Wilk http://blog.josephwilk.net> >> A "successful" step is any step that is matched, has some code and >> doesn''t assert anything resolving to false. >> > > Or raise an error. > > >> A "gray" out step means that no steps were found that matched the feature. >> > > Blue? Means that a step was found, but a previous step was either > pending or failed. > > >> You need to be careful that features do not match steps in the step >> file or cucumber will execute the first step it finds that matches >> (really don''t know how this works, will a test sequence ever go >> ''backwards''?) >> > > Cucumber tells you when it finds two steps definitions that could > match the step in the feature. > > >> Going back and changing the stuff in the .feature file is risky as >> it''s very easy to create a mismatch and the step won''t be found. >> > > Not sure why that is risky, unless you mean that there are > non-developers making these changes. If so, then they should probably > be made collaboratively. > > >> Thanks very much, >> >> Tim >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >
David Chelimsky
2008-Dec-17 21:53 UTC
[rspec-users] [Cucumber] a few clarifications please...
On Wed, Dec 17, 2008 at 3:37 PM, Tim Walker <walketim at gmail.com> wrote:> Thank you David. This helps a lot. Question, if there are matching > steps...will cucumber find the first matching step during execution? I > noticed a test executing at higher line numbers and then picking up a > step with a lower line number.Again, cucumber looks at all of the steps and throws an error if more than one will match your step. So order should not be an issue.> > Thanks again, > > Tim > > On Wed, Dec 17, 2008 at 2:22 PM, David Chelimsky <dchelimsky at gmail.com> wrote: >> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: >>> Hi Guys, >>> >>> Things are working great with Cucumber and am getting better at >>> expressing requirements as behaviors. Kudos! >>> >>> I seek a couple of points of clarification, or confirmation, if >>> someone has a minute or two... >>> >>> FWIW - I''ve read the wiki and the given-when-then page and just seek >>> confirmation: >>> >>> There is no dependency implied in the keywords "given", "then" and >>> "when" (as well as "and" and "but), correct? These are simply naming >>> conventions that denote the well known "Build/Operate/Check" pattern >>> but have no real physical relationship, they''re just tags that denote >>> the steps. >> >> Correct. >> >>> A "pending" step is any step that has a matching step but nothing is >>> implemented. >> >> Correct. >> >>> A "successful" step is any step that is matched, has some code and >>> doesn''t assert anything resolving to false. >> >> Or raise an error. >> >>> A "gray" out step means that no steps were found that matched the feature. >> >> Blue? Means that a step was found, but a previous step was either >> pending or failed. >> >>> You need to be careful that features do not match steps in the step >>> file or cucumber will execute the first step it finds that matches >>> (really don''t know how this works, will a test sequence ever go >>> ''backwards''?) >> >> Cucumber tells you when it finds two steps definitions that could >> match the step in the feature. >> >>> Going back and changing the stuff in the .feature file is risky as >>> it''s very easy to create a mismatch and the step won''t be found. >> >> Not sure why that is risky, unless you mean that there are >> non-developers making these changes. If so, then they should probably >> be made collaboratively. >> >>> >>> Thanks very much, >>> >>> Tim >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Great information guys, making some progress on this end. It is much appreciated. Discovered that step definitions can not be duplicated even across step files. Is this correct? Thanks again. Sincerely, Tim On Wed, Dec 17, 2008 at 2:39 PM, Joseph Wilk <josephwilk at joesniff.co.uk> wrote:> David Chelimsky wrote: >> >> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: >> >>> >>> Hi Guys, >>> >>> Things are working great with Cucumber and am getting better at >>> expressing requirements as behaviors. Kudos! >>> >>> I seek a couple of points of clarification, or confirmation, if >>> someone has a minute or two... >>> >>> FWIW - I''ve read the wiki and the given-when-then page and just seek >>> confirmation: >>> >>> There is no dependency implied in the keywords "given", "then" and >>> "when" (as well as "and" and "but), correct? These are simply naming >>> conventions that denote the well known "Build/Operate/Check" pattern >>> but have no real physical relationship, they''re just tags that denote >>> the steps. >>> >> >> Correct. >> >> >>> >>> A "pending" step is any step that has a matching step but nothing is >>> implemented. >>> >> >> Correct. >> > > In the latest version in Github (0.1.13) you can also force steps which have > an implementation to the pending state using the ''pending'' method which > works in the same way as Rspec''s pending. > > When "I want to be lazy" do > pending "Implement me!" > end > > -- > Joseph Wilk > http://blog.josephwilk.net > >> >>> >>> A "successful" step is any step that is matched, has some code and >>> doesn''t assert anything resolving to false. >>> >> >> Or raise an error. >> >> >>> >>> A "gray" out step means that no steps were found that matched the >>> feature. >>> >> >> Blue? Means that a step was found, but a previous step was either >> pending or failed. >> >> >>> >>> You need to be careful that features do not match steps in the step >>> file or cucumber will execute the first step it finds that matches >>> (really don''t know how this works, will a test sequence ever go >>> ''backwards''?) >>> >> >> Cucumber tells you when it finds two steps definitions that could >> match the step in the feature. >> >> >>> >>> Going back and changing the stuff in the .feature file is risky as >>> it''s very easy to create a mismatch and the step won''t be found. >>> >> >> Not sure why that is risky, unless you mean that there are >> non-developers making these changes. If so, then they should probably >> be made collaboratively. >> >> >>> >>> Thanks very much, >>> >>> Tim >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >>> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
aslak hellesoy
2008-Dec-17 22:51 UTC
[rspec-users] [Cucumber] a few clarifications please...
On Wed, Dec 17, 2008 at 10:53 PM, David Chelimsky <dchelimsky at gmail.com>wrote:> On Wed, Dec 17, 2008 at 3:37 PM, Tim Walker <walketim at gmail.com> wrote: > > Thank you David. This helps a lot. Question, if there are matching > > steps...will cucumber find the first matching step during execution? I > > noticed a test executing at higher line numbers and then picking up a > > step with a lower line number. > > Again, cucumber looks at all of the steps and throws an error if more > than one will match your step. So order should not be an issue. > > > > > Thanks again, > > > > Tim > > > > On Wed, Dec 17, 2008 at 2:22 PM, David Chelimsky <dchelimsky at gmail.com> > wrote: > >> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: > >>> Hi Guys, > >>> > >>> Things are working great with Cucumber and am getting better at > >>> expressing requirements as behaviors. Kudos! > >>> > >>> I seek a couple of points of clarification, or confirmation, if > >>> someone has a minute or two... > >>> > >>> FWIW - I''ve read the wiki and the given-when-then page and just seek > >>> confirmation: > >>> > >>> There is no dependency implied in the keywords "given", "then" and > >>> "when" (as well as "and" and "but), correct? These are simply naming > >>> conventions that denote the well known "Build/Operate/Check" pattern > >>> but have no real physical relationship, they''re just tags that denote > >>> the steps. > >> > >> Correct. > >> > >>> A "pending" step is any step that has a matching step but nothing is > >>> implemented. > >> > >> Correct. > >> >A "pending" step (plain text) is any step that *does not* have a matching step definition (regexp+proc). -Or (as of 0.1.13) a matching step definition that raises Pending (for example by calling #pending).> > >>> A "successful" step is any step that is matched, has some code and > >>> doesn''t assert anything resolving to false. > >> > >> Or raise an error. > >> > >>> A "gray" out step means that no steps were found that matched the > feature. > >> > >> Blue? Means that a step was found, but a previous step was either > >> pending or failed. > >> > >>> You need to be careful that features do not match steps in the step > >>> file or cucumber will execute the first step it finds that matches > >>> (really don''t know how this works, will a test sequence ever go > >>> ''backwards''?) > >> > >> Cucumber tells you when it finds two steps definitions that could > >> match the step in the feature. > >> > >>> Going back and changing the stuff in the .feature file is risky as > >>> it''s very easy to create a mismatch and the step won''t be found. > >> > >> Not sure why that is risky, unless you mean that there are > >> non-developers making these changes. If so, then they should probably > >> be made collaboratively. > >> >Every time something is changed, you run Cucumber immediately, and then you''ll know if you broke something. Aslak> > >>> > >>> Thanks very much, > >>> > >>> Tim > >>> _______________________________________________ > >>> rspec-users mailing list > >>> rspec-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/rspec-users > >>> > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > >> > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081217/ebbe7f34/attachment.html>
Tim Walker wrote:> Great information guys, making some progress on this end. It is much > appreciated. > > Discovered that step definitions can not be duplicated even across > step files. Is this correct? > >Correct. They can''t be duplicated in any given process, no mater what file(s) the definitions come from. -Ben> Thanks again. > > Sincerely, > > Tim > > On Wed, Dec 17, 2008 at 2:39 PM, Joseph Wilk <josephwilk at joesniff.co.uk> wrote: > >> David Chelimsky wrote: >> >>> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: >>> >>> >>>> Hi Guys, >>>> >>>> Things are working great with Cucumber and am getting better at >>>> expressing requirements as behaviors. Kudos! >>>> >>>> I seek a couple of points of clarification, or confirmation, if >>>> someone has a minute or two... >>>> >>>> FWIW - I''ve read the wiki and the given-when-then page and just seek >>>> confirmation: >>>> >>>> There is no dependency implied in the keywords "given", "then" and >>>> "when" (as well as "and" and "but), correct? These are simply naming >>>> conventions that denote the well known "Build/Operate/Check" pattern >>>> but have no real physical relationship, they''re just tags that denote >>>> the steps. >>>> >>>> >>> Correct. >>> >>> >>> >>>> A "pending" step is any step that has a matching step but nothing is >>>> implemented. >>>> >>>> >>> Correct. >>> >>> >> In the latest version in Github (0.1.13) you can also force steps which have >> an implementation to the pending state using the ''pending'' method which >> works in the same way as Rspec''s pending. >> >> When "I want to be lazy" do >> pending "Implement me!" >> end >> >> -- >> Joseph Wilk >> http://blog.josephwilk.net >> >> >>>> A "successful" step is any step that is matched, has some code and >>>> doesn''t assert anything resolving to false. >>>> >>>> >>> Or raise an error. >>> >>> >>> >>>> A "gray" out step means that no steps were found that matched the >>>> feature. >>>> >>>> >>> Blue? Means that a step was found, but a previous step was either >>> pending or failed. >>> >>> >>> >>>> You need to be careful that features do not match steps in the step >>>> file or cucumber will execute the first step it finds that matches >>>> (really don''t know how this works, will a test sequence ever go >>>> ''backwards''?) >>>> >>>> >>> Cucumber tells you when it finds two steps definitions that could >>> match the step in the feature. >>> >>> >>> >>>> Going back and changing the stuff in the .feature file is risky as >>>> it''s very easy to create a mismatch and the step won''t be found. >>>> >>>> >>> Not sure why that is risky, unless you mean that there are >>> non-developers making these changes. If so, then they should probably >>> be made collaboratively. >>> >>> >>> >>>> Thanks very much, >>>> >>>> Tim >>>> _______________________________________________ >>>> rspec-users mailing list >>>> rspec-users at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/rspec-users >>>> >>>> >>>> >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >>> >>> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
aslak hellesoy
2008-Dec-18 00:07 UTC
[rspec-users] [Cucumber] a few clarifications please...
On Wed, Dec 17, 2008 at 11:50 PM, Tim Walker <walketim at gmail.com> wrote:> Great information guys, making some progress on this end. It is much > appreciated. > > Discovered that step definitions can not be duplicated even across > step files. Is this correct? >Regexen can not be the same (even if the blocks are different). I just refactored the wiki a little and added a new page about this: http://github.com/aslakhellesoy/cucumber/wikis/step-definitions Aslak> Thanks again. > > Sincerely, > > Tim > > On Wed, Dec 17, 2008 at 2:39 PM, Joseph Wilk <josephwilk at joesniff.co.uk> > wrote: > > David Chelimsky wrote: > >> > >> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> wrote: > >> > >>> > >>> Hi Guys, > >>> > >>> Things are working great with Cucumber and am getting better at > >>> expressing requirements as behaviors. Kudos! > >>> > >>> I seek a couple of points of clarification, or confirmation, if > >>> someone has a minute or two... > >>> > >>> FWIW - I''ve read the wiki and the given-when-then page and just seek > >>> confirmation: > >>> > >>> There is no dependency implied in the keywords "given", "then" and > >>> "when" (as well as "and" and "but), correct? These are simply naming > >>> conventions that denote the well known "Build/Operate/Check" pattern > >>> but have no real physical relationship, they''re just tags that denote > >>> the steps. > >>> > >> > >> Correct. > >> > >> > >>> > >>> A "pending" step is any step that has a matching step but nothing is > >>> implemented. > >>> > >> > >> Correct. > >> > > > > In the latest version in Github (0.1.13) you can also force steps which > have > > an implementation to the pending state using the ''pending'' method which > > works in the same way as Rspec''s pending. > > > > When "I want to be lazy" do > > pending "Implement me!" > > end > > > > -- > > Joseph Wilk > > http://blog.josephwilk.net > > > >> > >>> > >>> A "successful" step is any step that is matched, has some code and > >>> doesn''t assert anything resolving to false. > >>> > >> > >> Or raise an error. > >> > >> > >>> > >>> A "gray" out step means that no steps were found that matched the > >>> feature. > >>> > >> > >> Blue? Means that a step was found, but a previous step was either > >> pending or failed. > >> > >> > >>> > >>> You need to be careful that features do not match steps in the step > >>> file or cucumber will execute the first step it finds that matches > >>> (really don''t know how this works, will a test sequence ever go > >>> ''backwards''?) > >>> > >> > >> Cucumber tells you when it finds two steps definitions that could > >> match the step in the feature. > >> > >> > >>> > >>> Going back and changing the stuff in the .feature file is risky as > >>> it''s very easy to create a mismatch and the step won''t be found. > >>> > >> > >> Not sure why that is risky, unless you mean that there are > >> non-developers making these changes. If so, then they should probably > >> be made collaboratively. > >> > >> > >>> > >>> Thanks very much, > >>> > >>> Tim > >>> _______________________________________________ > >>> rspec-users mailing list > >>> rspec-users at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/rspec-users > >>> > >>> > >> > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-users at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/rspec-users > >> > >> > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081218/817058cc/attachment.html>
Steve Molitor
2008-Dec-18 01:30 UTC
[rspec-users] [Cucumber] a few clarifications please...
What about two steps with the same regex but are of different types -- i.e. a Given and a Then with the same regexp? Steve On Wed, Dec 17, 2008 at 6:07 PM, aslak hellesoy <aslak.hellesoy at gmail.com>wrote:> > > On Wed, Dec 17, 2008 at 11:50 PM, Tim Walker <walketim at gmail.com> wrote: > >> Great information guys, making some progress on this end. It is much >> appreciated. >> >> Discovered that step definitions can not be duplicated even across >> step files. Is this correct? >> > > Regexen can not be the same (even if the blocks are different). I just > refactored the wiki a little and added a new page about this: > http://github.com/aslakhellesoy/cucumber/wikis/step-definitions > > Aslak > > >> Thanks again. >> >> Sincerely, >> >> Tim >> >> On Wed, Dec 17, 2008 at 2:39 PM, Joseph Wilk <josephwilk at joesniff.co.uk> >> wrote: >> > David Chelimsky wrote: >> >> >> >> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> >> wrote: >> >> >> >>> >> >>> Hi Guys, >> >>> >> >>> Things are working great with Cucumber and am getting better at >> >>> expressing requirements as behaviors. Kudos! >> >>> >> >>> I seek a couple of points of clarification, or confirmation, if >> >>> someone has a minute or two... >> >>> >> >>> FWIW - I''ve read the wiki and the given-when-then page and just seek >> >>> confirmation: >> >>> >> >>> There is no dependency implied in the keywords "given", "then" and >> >>> "when" (as well as "and" and "but), correct? These are simply naming >> >>> conventions that denote the well known "Build/Operate/Check" pattern >> >>> but have no real physical relationship, they''re just tags that denote >> >>> the steps. >> >>> >> >> >> >> Correct. >> >> >> >> >> >>> >> >>> A "pending" step is any step that has a matching step but nothing is >> >>> implemented. >> >>> >> >> >> >> Correct. >> >> >> > >> > In the latest version in Github (0.1.13) you can also force steps which >> have >> > an implementation to the pending state using the ''pending'' method which >> > works in the same way as Rspec''s pending. >> > >> > When "I want to be lazy" do >> > pending "Implement me!" >> > end >> > >> > -- >> > Joseph Wilk >> > http://blog.josephwilk.net >> > >> >> >> >>> >> >>> A "successful" step is any step that is matched, has some code and >> >>> doesn''t assert anything resolving to false. >> >>> >> >> >> >> Or raise an error. >> >> >> >> >> >>> >> >>> A "gray" out step means that no steps were found that matched the >> >>> feature. >> >>> >> >> >> >> Blue? Means that a step was found, but a previous step was either >> >> pending or failed. >> >> >> >> >> >>> >> >>> You need to be careful that features do not match steps in the step >> >>> file or cucumber will execute the first step it finds that matches >> >>> (really don''t know how this works, will a test sequence ever go >> >>> ''backwards''?) >> >>> >> >> >> >> Cucumber tells you when it finds two steps definitions that could >> >> match the step in the feature. >> >> >> >> >> >>> >> >>> Going back and changing the stuff in the .feature file is risky as >> >>> it''s very easy to create a mismatch and the step won''t be found. >> >>> >> >> >> >> Not sure why that is risky, unless you mean that there are >> >> non-developers making these changes. If so, then they should probably >> >> be made collaboratively. >> >> >> >> >> >>> >> >>> Thanks very much, >> >>> >> >>> Tim >> >>> _______________________________________________ >> >>> rspec-users mailing list >> >>> rspec-users at rubyforge.org >> >>> http://rubyforge.org/mailman/listinfo/rspec-users >> >>> >> >>> >> >> >> >> _______________________________________________ >> >> rspec-users mailing list >> >> rspec-users at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/rspec-users >> >> >> >> >> > >> > _______________________________________________ >> > rspec-users mailing list >> > rspec-users at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/rspec-users >> > >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users >> > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081217/d4f2283f/attachment.html>
On Wed, Dec 17, 2008 at 8:30 PM, Steve Molitor <stevemolitor at gmail.com> wrote:> What about two steps with the same regex but are of different types -- i.e. > a Given and a Then with the same regexp?They do the exact same thing. Given|When|Then is just a nicety for you as the developer. Cucumber could care less. This is the code from Cucumber: def Given(key, &proc) step_mother.register_step_proc(key, &proc) end def When(key, &proc) step_mother.register_step_proc(key, &proc) end def Then(key, &proc) step_mother.register_step_proc(key, &proc) end> Steve > > On Wed, Dec 17, 2008 at 6:07 PM, aslak hellesoy <aslak.hellesoy at gmail.com> > wrote: >> >> >> On Wed, Dec 17, 2008 at 11:50 PM, Tim Walker <walketim at gmail.com> wrote: >>> >>> Great information guys, making some progress on this end. It is much >>> appreciated. >>> >>> Discovered that step definitions can not be duplicated even across >>> step files. Is this correct? >> >> Regexen can not be the same (even if the blocks are different). I just >> refactored the wiki a little and added a new page about this: >> http://github.com/aslakhellesoy/cucumber/wikis/step-definitions >> >> Aslak >> >>> >>> Thanks again. >>> >>> Sincerely, >>> >>> Tim >>> >>> On Wed, Dec 17, 2008 at 2:39 PM, Joseph Wilk <josephwilk at joesniff.co.uk> >>> wrote: >>> > David Chelimsky wrote: >>> >> >>> >> On Wed, Dec 17, 2008 at 2:34 PM, Tim Walker <walketim at gmail.com> >>> >> wrote: >>> >> >>> >>> >>> >>> Hi Guys, >>> >>> >>> >>> Things are working great with Cucumber and am getting better at >>> >>> expressing requirements as behaviors. Kudos! >>> >>> >>> >>> I seek a couple of points of clarification, or confirmation, if >>> >>> someone has a minute or two... >>> >>> >>> >>> FWIW - I''ve read the wiki and the given-when-then page and just seek >>> >>> confirmation: >>> >>> >>> >>> There is no dependency implied in the keywords "given", "then" and >>> >>> "when" (as well as "and" and "but), correct? These are simply naming >>> >>> conventions that denote the well known "Build/Operate/Check" pattern >>> >>> but have no real physical relationship, they''re just tags that denote >>> >>> the steps. >>> >>> >>> >> >>> >> Correct. >>> >> >>> >> >>> >>> >>> >>> A "pending" step is any step that has a matching step but nothing is >>> >>> implemented. >>> >>> >>> >> >>> >> Correct. >>> >> >>> > >>> > In the latest version in Github (0.1.13) you can also force steps which >>> > have >>> > an implementation to the pending state using the ''pending'' method which >>> > works in the same way as Rspec''s pending. >>> > >>> > When "I want to be lazy" do >>> > pending "Implement me!" >>> > end >>> > >>> > -- >>> > Joseph Wilk >>> > http://blog.josephwilk.net >>> > >>> >> >>> >>> >>> >>> A "successful" step is any step that is matched, has some code and >>> >>> doesn''t assert anything resolving to false. >>> >>> >>> >> >>> >> Or raise an error. >>> >> >>> >> >>> >>> >>> >>> A "gray" out step means that no steps were found that matched the >>> >>> feature. >>> >>> >>> >> >>> >> Blue? Means that a step was found, but a previous step was either >>> >> pending or failed. >>> >> >>> >> >>> >>> >>> >>> You need to be careful that features do not match steps in the step >>> >>> file or cucumber will execute the first step it finds that matches >>> >>> (really don''t know how this works, will a test sequence ever go >>> >>> ''backwards''?) >>> >>> >>> >> >>> >> Cucumber tells you when it finds two steps definitions that could >>> >> match the step in the feature. >>> >> >>> >> >>> >>> >>> >>> Going back and changing the stuff in the .feature file is risky as >>> >>> it''s very easy to create a mismatch and the step won''t be found. >>> >>> >>> >> >>> >> Not sure why that is risky, unless you mean that there are >>> >> non-developers making these changes. If so, then they should probably >>> >> be made collaboratively. >>> >> >>> >> >>> >>> >>> >>> Thanks very much, >>> >>> >>> >>> Tim >>> >>> _______________________________________________ >>> >>> rspec-users mailing list >>> >>> rspec-users at rubyforge.org >>> >>> http://rubyforge.org/mailman/listinfo/rspec-users >>> >>> >>> >>> >>> >> >>> >> _______________________________________________ >>> >> rspec-users mailing list >>> >> rspec-users at rubyforge.org >>> >> http://rubyforge.org/mailman/listinfo/rspec-users >>> >> >>> >> >>> > >>> > _______________________________________________ >>> > rspec-users mailing list >>> > rspec-users at rubyforge.org >>> > http://rubyforge.org/mailman/listinfo/rspec-users >>> > >>> _______________________________________________ >>> rspec-users mailing list >>> rspec-users at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/rspec-users >> >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com