Forum: RSpec cucumber fit step table output

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jonathan L. (Guest)
on 2008-12-28 20:13
(Received via mailing list)
If this is a bug I'll submit a ticket.
Or, maybe I'd doing something wrong.

Using a Cucumber FIT Step Table, the scenario runs and passes (and
fails when i put bad data in the table). But the console output only
shows the Step text, not the table so when I read the output it's not
telling me what data was actually run.

Cucumber 0.1.13.2

tia,
linoj
Emmanuel P. (Guest)
on 2008-12-28 20:27
(Received via mailing list)
I think this is not yet implemented. I had the same issue and was told
they are working on it but that they are doing a big refactoring so
might not be in 0.1.13 yet

To work around that issues. I created a helper method that can print
the table in one line or multiple line. Then call the method with the
element of the table twice. One for the table and one to show them in
the step. Then I made  sure all the step regular expresion supported
that notation

Thanks

Emmanuel
Jonathan L. (Guest)
on 2008-12-28 20:42
(Received via mailing list)
could you pastie an example?
Emmanuel P. (Guest)
on 2008-12-29 07:38
(Received via mailing list)
something like

Given I do something with the following param |Key1|value1|, |Key2|
Value2|
  |Key1|value1|
  |Key2|Value2|


Then your step could look like

Given 'I do something with the following .*' do | table|
     // your logic
end

Emmanuel
Aslak H. (Guest)
on 2008-12-29 16:59
(Received via mailing list)
On Sun, Dec 28, 2008 at 7:19 PM, Emmanuel P.
<removed_email_address@domain.invalid>wrote:

> I think this is not yet implemented. I had the same issue and was told they
> are working on it but that they are doing a big refactoring so might not be
> in 0.1.13 yet
>

That's right. You have to wait for the next major release to have tables
printed.


> On Dec 28, 2008, at 10:09 AM, Jonathan L. wrote:
>
>  If this is a bug I'll submit a ticket.
>> Or, maybe I'd doing something wrong.
>>
>> Using a Cucumber FIT Step Table,
>
>
Let's stop calling tables "FIT tables". Tables are *inspired* from the
FIT
tool, but they *are not* FIT tables. Better names:

Step tables and Scenario tables.

Step tables are tables that are arguments to step definitions.

Scenario tables are tables that invoke a Scenario (or Scenario Outline)
with
special values.

Aslak

the scenario runs and passes (and fails when i put bad data in the
table).
This topic is locked and can not be replied to.