Last active
August 29, 2015 14:00
-
-
Save andersr/11124855 to your computer and use it in GitHub Desktop.
Example of converting a pseudo code line into a test
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
describe "Cut two slices of bread and place on the plate" do | |
it "grasps the Knife in a cutting grasp" do { | |
#code that attempts to complete this task | |
#if it passes, it returns something to hte effect of "test passed" | |
#if it fails, it returns a message like "grasps the Knife in a cutting grasp" failed, for the following reasons, eg no 'No Knife was found' | |
} | |
# Grasp the bread-loaf and place it on the table, such that it is directly below the knife. | |
# Position the bread-loaf such that it is perpendicular to the cutting edge of the knife and move the bread-loaf laterally until only a half inch is below the knife. | |
# Press the knife down on the bread-loaf, ensuring that only the sharp edge of the knife comes in contact with the bread-loaf. | |
# While continuing to press down on the bread-lof, rapidly move the knife toward and away from you without the knife edge going outside the boundaries of the bread loaf. Continue this motion until a piece of the bread loaf has become completely detached from the bread loaf. | |
# The piece that has become detached is a "bread-slice" | |
# The part of the bread-slice that is facing upward is the "top of the slice" | |
# Move the bread-slice onto the plate. | |
# IF there are no slices on the plate, this is the "pb-slice" | |
# ELSE this is the "jelly-slice" | |
# Repeat these steps once more, then continue to the next step. | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment