Skip to content

Instantly share code, notes, and snippets.

@springaki
Last active December 11, 2015 06:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save springaki/4563036 to your computer and use it in GitHub Desktop.
Cucumber の tablish の代わり
# tablish
# tableish('table tr', 'th,td')
find('table').all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } }
# ex.
Then /^the table should be:$/ do |table|
table.diff!(find("table").all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } })
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment