Table diff! only raise when data is missing

36 views
Skip to first unread message

senny

unread,
Jan 29, 2010, 5:37:16 AM1/29/10
to Cukes
Hey there

I am trying to write a step definition that only raises an error when
the data specified in the feature is not present in the actual table.
The step definition should NOT raise when the actual table contains
more data than the one specified in the feature file. I have created a
Gist to illustrate my problem: http://gist.github.com/289623

Is there a way to make this scenario pass?

Cheers,
Senny

darrinholst

unread,
Jan 29, 2010, 7:46:37 AM1/29/10
to Cukes
try replacing :surplus_row => false with :missing_row => false, which
reads don't raise if the expected table has missing rows...I think:)

aslak hellesoy

unread,
Jan 29, 2010, 7:55:50 AM1/29/10
to cukes
On Fri, Jan 29, 2010 at 1:46 PM, darrinholst <darrin...@gmail.com> wrote:
> try replacing :surplus_row => false with :missing_row => false, which
> reads don't raise if the expected table has missing rows...I think:)
>

But the table passed as an argument to diff! doesn't have missing rows
- it has surplus rows. There is definitely a bug. See my other post.

Aslak

> On Jan 29, 4:37 am, senny <yves.s...@gmail.com> wrote:
>> Hey there
>>
>> I am trying to write a step definition that only raises an error when
>> the data specified in the feature is not present in the actual table.
>> The step definition should NOT raise when the actual table contains
>> more data than the one specified in the feature file. I have created a
>> Gist to illustrate my problem:http://gist.github.com/289623
>>
>> Is there a way to make this scenario pass?
>>
>> Cheers,
>> Senny
>

> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>
>

senny

unread,
Jan 29, 2010, 8:50:45 AM1/29/10
to Cukes
I opened a ticket on the Lighthouse Tracker:
https://rspec.lighthouseapp.com/projects/16211-cucumber/tickets/566-tablediff-not-working-with-surplus_row-false

Thanks for your help Aslak

On 29 Jan., 13:55, aslak hellesoy <aslak.helle...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages