Skip to content

Instantly share code, notes, and snippets.

@felixflores
Created November 29, 2009 05:11
Show Gist options
  • Save felixflores/244802 to your computer and use it in GitHub Desktop.
Save felixflores/244802 to your computer and use it in GitHub Desktop.
Feature: User profiles
In order to have users profiles
for the website
I want to be able to view and edit users
Background: Set up user
Scenario: Edit profile
Given a user is logged in as "foobar@example.com"
When I follow "My Account"
And I fill in the following:
| Email | foo@example.com |
| Password | foobar |
| Password Confirmation | foobar |
And I attach the file "/features/felix.jpg" to "Upload Photo"
And I press "Save"
Then I should see "Account updated!"
When I follow "My Account"
Then the "Email" field should contain "foo@example.com"
Scenario: Edit users
Given a user exist with email: "foobar@example.com" and a photo
And I am on the users index page
When I follow "edit"
Then I should see "Edit foobar@example.com" within "<h2>"
When I press "Save"
Then I should see "Account updated!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment