-
-
Save leifbladt/1312840 to your computer and use it in GitHub Desktop.
Convert a Capybara table to something you can diff with a Cucumber table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change 'table' to a more specific selector when the page will have more than one table | |
find('table').all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment