0

我需要使用:

在功能文件中

Then I should see all of the texts:
  | the first text  |
  | the third text  |
  | the fourth text |

请帮助,描述此步骤:

在步骤文件中

Then(/^I should see all text:$/) do |table|
  # table is a Cucumber::Ast::Table
  ........................
end

==================================================== =======================

我决定如下:

Then(/^I should see all text:$/) do |table|
  table.rows.flatten.each do |text|
    should have_content(text)
  end
end

但如果你有更好的步骤,请写!

谢谢!

4

0 回答 0