-
-
Save gauravsaini23/1480785 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 hidden or 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
# add this method to enable method tableish in a different way | |
module WithinHelpers | |
def tableish(id) | |
find('table' + '#' + id).all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } } | |
end | |
end | |
World(WithinHelpers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment