Re: [rspec-users] Cucumber tables

2009-05-16 Thread aslak hellesoy
> Aslak Hellesøy wrote: > >> >> Which terms do you think we should adopt and where in the wiki should >> this be emphasized more clearly? >> >> Aslak > > The best suggestion that I can come up with is: Outline Tables for > Scenario Outlines and Inline Tables for regular scenarios. > > As far as the

Re: [rspec-users] Cucumber tables

2009-05-16 Thread James Byrne
Aslak Hellesøy wrote: > > Which terms do you think we should adopt and where in the wiki should > this be emphasized more clearly? > > Aslak The best suggestion that I can come up with is: Outline Tables for Scenario Outlines and Inline Tables for regular scenarios. As far as the wiki goes th

Re: [rspec-users] Cucumber tables

2009-05-15 Thread aslak hellesoy
> Aslak Hellesøy wrote: >>> sure that this is what I was doing, although the table followed a >>> complete scenario. �However, I have not used tables for the last couple >>> of months and am somewhat perplexed with respect to the changes. >> >> What are these changes you are talking about?? The onl

Re: [rspec-users] Cucumber tables

2009-05-15 Thread James Byrne
Aslak Hellesøy wrote: >> sure that this is what I was doing, although the table followed a >> complete scenario. �However, I have not used tables for the last couple >> of months and am somewhat perplexed with respect to the changes. > > What are these changes you are talking about?? The only thin

Re: [rspec-users] Cucumber tables

2009-05-15 Thread aslak hellesoy
> Chris Flipse wrote: > >> They're actually unrelated.  Most of my table matchers have no other >> regex in the expression >> >> You're not seeing anything else with the table data because you're not >> doing >> anything with the table data. >> >>  Given /the following data rates/ do |table| >>    

Re: [rspec-users] Cucumber tables

2009-05-15 Thread aslak hellesoy
> Aslak Hellesøy wrote: > >> http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines >> >> Please let us know what's missing or unclear about that. >> > > That documentation is for scenario outlines.  I had gathered that one > could also simply use tables with regular scenarios where the ta

Re: [rspec-users] Cucumber tables

2009-05-15 Thread James Byrne
Chris Flipse wrote: > They're actually unrelated. Most of my table matchers have no other > regex in the expression > > You're not seeing anything else with the table data because you're not > doing > anything with the table data. > > Given /the following data rates/ do |table| > table.h

Re: [rspec-users] Cucumber tables

2009-05-15 Thread James Byrne
Aslak Hellesøy wrote: > http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines > > Please let us know what's missing or unclear about that. > That documentation is for scenario outlines. I had gathered that one could also simply use tables with regular scenarios where the table valu

Re: [rspec-users] Cucumber tables

2009-05-15 Thread James Byrne
I do not know if I am doing something wrong or not, but I am seeing evidence that feature tables in normal scenarios do not actually do anything. # feature statement And we do have a forex rate for "USD" on "2009-03-31" of "0.8666" | "USD" | "2009-04-01" | "0.8555" | | "USD" | "

Re: [rspec-users] Cucumber tables

2009-05-15 Thread aslak hellesoy
> I cannot seem to locate any documentation on how to implement the new > table syntax otherwise I would not bother the list with this. > I'm not sure what you mean by "new" table syntax. The syntax for tables hasn't really changed since it was introduced. > I wish to write something like this: >

Re: [rspec-users] Cucumber tables

2009-05-15 Thread Chris Flipse
On Fri, May 15, 2009 at 11:35 AM, James Byrne wrote: > I cannot seem to locate any documentation on how to implement the new > table syntax otherwise I would not bother the list with this. > > I wish to write something like this: > > And we do have a forex rate for the following currency code an

[rspec-users] Cucumber tables

2009-05-15 Thread James Byrne
I cannot seem to locate any documentation on how to implement the new table syntax otherwise I would not bother the list with this. I wish to write something like this: And we do have a forex rate for the following currency code and date |code |date| rate | |"USD"|"200

Re: [rspec-users] Cucumber Tables

2009-05-14 Thread James Byrne
Aslak Hellesøy wrote: > > If you don't do this, the multiline argument is "dangling". Steps that > take multiline arguments should be formulated in such a way that > removing the multiline argument makes the sentence nonsensical. Yes, I understood that. And I also realized that the solution is

Re: [rspec-users] Cucumber Tables

2009-05-13 Thread aslak hellesoy
> I am running into this situation: > > Feature 1 > >  Scenario A >    ... >    Then we should have currency exchange rates for "USD" on file >      And we should ... > > > Feature 2 > >  Scenario D >    ... >    Then we should have currency exchange rates for "USD" on file >        | code| >      

[rspec-users] Cucumber Tables

2009-05-13 Thread James Byrne
I am running into this situation: Feature 1 Scenario A ... Then we should have currency exchange rates for "USD" on file And we should ... Feature 2 Scenario D ... Then we should have currency exchange rates for "USD" on file | code| |"EUR"| |"

Re: [rspec-users] [Cucumber] Tables

2009-04-22 Thread Ben Mabey
John Goodsen wrote: I definitely prefer the range solution over the others. I agree, it makes sense and is simple IMO. On Wed, Apr 22, 2009 at 2:14 AM, aslak hellesoy mailto:aslak.helle...@gmail.com>> wrote: This is actually one of the best I've seen so far. However it doesn't sca

Re: [rspec-users] [Cucumber] Tables

2009-04-22 Thread Nigel Thorne
My initial approach to this (when I hit it in my work) was to get around this problem by catching the whole row from the example in the Before(scenario) filter, putting it into a well known member @data, so all steps have access to it. The problem with this is that it is then implicit which fields

Re: [rspec-users] [Cucumber] Tables

2009-04-22 Thread r_j_h_box-sf
From: aslak hellesoy > Here is an alternative: http://gist.github.com/99376 I'm a fan of simple, which means I'm a fan of this. The only thing I can think of that would be simpler is this: * When the arity of the matcher is larger by one than the match

Re: [rspec-users] [Cucumber] Tables

2009-04-22 Thread Kero van Gelder
> > Without adding a new feature to Cucumber, I'd probably do > > > > Scenario Outline: Religious menus > > Given the customer is a "" > > When they ask for the menu > > Then they should be presented with "" > > > > Examples: > > | Religion | Meats | > > | Christian | Pork,

Re: [rspec-users] [Cucumber] Tables

2009-04-22 Thread John Goodsen
I definitely prefer the range solution over the others. On Wed, Apr 22, 2009 at 2:14 AM, aslak hellesoy wrote: > > > This is actually one of the best I've seen so far. However it doesn't scale > for multiple columns. (Imagine if you have 5 of them - they easily get mixed > up, or you make a spell

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 6:56 PM, David Chelimsky wrote: > On Tue, Apr 21, 2009 at 11:39 AM, aslak hellesoy > wrote: > > Being the author of Cucumber, some of you might be surprised that I ask > this > > question: > > > > How should I go about to implement a Cucumber feature and step definition >

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Wed, Apr 22, 2009 at 2:27 AM, Jonathan Linowes wrote: > no offense to anyone here but all this is starting to remind me of the days > of green ASCII terminals... there's a reason gui's, wysiwyg editors and > typographic fonts were invented...ok, nevermind, back to plain text, > proportional fon

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
the output would be weird, eg Then he should see pork selections if And he should see lamb selections if Y And he should see veal selections if On Apr 21, 2009, at 2:17 PM, Aaron VonderHaar wrote: I think the scenario outline is the way to go, but in your example it's not clear to

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread David Chelimsky
On Tue, Apr 21, 2009 at 11:39 AM, aslak hellesoy wrote: > Being the author of Cucumber, some of you might be surprised that I ask this > question: > > How should I go about to implement a Cucumber feature and step definition > with the following data? > http://gist.github.com/99220 (just look at t

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
no offense to anyone here but all this is starting to remind me of the days of green ASCII terminals... there's a reason gui's, wysiwyg editors and typographic fonts were invented... ok, nevermind, back to plain text, proportional font, character chart art :) On Apr 21, 2009, at 6:50

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Nigel Thorne
Here is the same thing as a gist http://gist.github.com/99443 2009/4/22 Nigel Thorne > I would prefer it to be explicit what columns I am using, that way if you > have two steps that require this technique in your scenario it still > works.Relying > on an implicit 'the rest' doesn't work in that

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Nigel Thorne
I would prefer it to be explicit what columns I am using, that way if you have two steps that require this technique in your scenario it still works.Relying on an implicit 'the rest' doesn't work in that situation. In my scenario I would like to have something like this.. Given I am logged in as

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Ben Mabey
aslak hellesoy wrote: On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk > wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes mailto:jonat...@parkerhill.com>> wrote: > > On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: > >> What you really w

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 8:50 PM, Jonathan Linowes wrote: > Without adding a new feature to Cucumber, I'd probably do > > Scenario Outline: Religious menus > Given the customer is a "" > When they ask for the menu > Then they should be presented with "" > > Examples: > | Religion | Meats

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Matt Wynne
On 21 Apr 2009, at 22:13, aslak hellesoy wrote: On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk wrote: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes wrote: > > On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: > >> What you really want is an examples table that is embedded in a step >>

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
On Tue, Apr 21, 2009 at 10:20 PM, Joseph Wilk wrote: > On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes > wrote: > > > > On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: > > > >> What you really want is an examples table that is embedded in a step > >> (different from a step table, maybe by keyw

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Joseph Wilk
On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes wrote: > > On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: > >> What you really want is an examples table that is embedded in a step >> (different from a step table, maybe by keyword?) that causes the step to be >> run multiple times for each of th

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: What you really want is an examples table that is embedded in a step (different from a step table, maybe by keyword?) that causes the step to be run multiple times for each of the values. So rather than using placeholders we embedded a Exampl

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
Without adding a new feature to Cucumber, I'd probably do Scenario Outline: Religious menus Given the customer is a "" When they ask for the menu Then they should be presented with "" Examples: | Religion | Meats | | Christian | Pork, Lamb, Veal | | Jewish|L

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Aaron VonderHaar
I think the scenario outline is the way to go, but in your example it's not clear to me what the behavior is supposed to be-- is the expected output in your Then statement really providing value? Here's my take on it: http://gist.github.com/99281 Scenario Outline: Religious menus Given th

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Matt Wynne
On 21 Apr 2009, at 17:39, aslak hellesoy wrote: Being the author of Cucumber, some of you might be surprised that I ask this question: How should I go about to implement a Cucumber feature and step definition with the following data? http://gist.github.com/99220 (just look at the first fi

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Joseph Wilk
aslak hellesoy wrote: Being the author of Cucumber, some of you might be surprised that I ask this question: How should I go about to implement a Cucumber feature and step definition with the following data? http://gist.github.com/99220 (just look at the first file for now) Imagine I'm openi

[rspec-users] [Cucumber] Tables

2009-04-21 Thread aslak hellesoy
Being the author of Cucumber, some of you might be surprised that I ask this question: How should I go about to implement a Cucumber feature and step definition with the following data? http://gist.github.com/99220 (just look at the first file for now) Imagine I'm opening a restaurant where custo