What is the difference between cuke4duke.Table.rows() and cuke4duke.Table.raw()
?
I’ve found that when I’m passing a table with one row only, rows() returns a list of size 0;
Cucumber steps
Then I see the following projects in the ProjectList
| My Private Project |
Java implementation
@Then ("^I see the following projects in the ProjectList$")
public void iSeeTheFollowingProjectsInProjectList(cuke4duke.Table table) {
table.rows().size(); // gives 0
table.raw().size(); // gives 1
But the following does work as intended It does!
Cucumber steps
Then I see the following projects in the ProjectList
| Regression Project 3 |
| My Private Project |
Java implementation
@Then ("^I see the following projects in the ProjectList$")
public void iSeeTheFollowingProjectsInProjectList(cuke4duke.Table table) {
// When I asked, I thought this was returning 2, but it's not, it's returning 1
table.rows().size();
table.raw().size(); // gives 2
Your results aren’t reproducible in Cucumber-Ruby.
For the first scenario
Table#rows()returns 0 results andTable#raw()– 1 resultFor the second scenario
Table#rows()returns 1 result andTable#raw()– 2 resultsTable#rows()recognizes the first row as table header.So if your results are true (I haven’t checked it), it may be a bug in Cuke4Duke.
But all work on Cuke4Duke is defunkt so it won’t get fixed.