Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save bcardarella/1018237 to your computer and use it in GitHub Desktop.

Select an option

Save bcardarella/1018237 to your computer and use it in GitHub Desktop.
Cucumber for punchclock
Feature: A user can punch in and out
In order to log hours
As an employee
I want to be able to punch in and punch out
Background:
Given the following user exists:
| name | email | password | role |
| foo | user@test.com | please | Employee |
And I log in as "user@test.com/please"
And I go to the home page
Scenario: User punches in
Given I am not punched in
When I punch in for "Office"
Then I should see confirmation that I am punched in
Scenario: User is punched in
Given I am punched in
When I am on the main page
Then I should see how long I have been punched in
And I should see a button to punch out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment