Last active
October 18, 2017 22:58
-
-
Save enkessler/5c82fb0f1d425acd4ec32efb6ae03f59 to your computer and use it in GitHub Desktop.
Data table corruption example
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
When(/^whatever we have too much of in the back room:$/) do |table| | |
$stdout.puts "starting table:\n#{table}" | |
$stdout.puts "id: #{table.rows_hash.object_id}" | |
@todays_sauce = ['ketchup', 'mustard', 'vinegar', 'mayo', 'lard'].sample | |
table.rows_hash['recipe'].sub!('<sauce of the day>', @todays_sauce) | |
@recipe = table.rows_hash['recipe'] | |
$stdout.puts "ending table:\n#{table}" | |
end | |
Then(/^inform the masses$/) do | |
$stdout.puts "Today's secret sauce is: #{@recipe}!" | |
expect(@recipe).to eq("3 squirts of #{@todays_sauce}") | |
end |
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
Feature: Our recipe | |
Background: | |
* whatever we have too much of in the back room: | |
| recipe | 3 squirts of <sauce of the day> | | |
Scenario: Monday | |
Then inform the masses | |
Scenario: Tuesday | |
Then inform the masses | |
Scenario: Wednesday | |
Then inform the masses | |
Scenario: Thursday | |
Then inform the masses | |
Scenario: Friday | |
Then inform the masses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment