Skip to content

Instantly share code, notes, and snippets.

@tarolandia
Last active December 24, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarolandia/6884472 to your computer and use it in GitHub Desktop.
Save tarolandia/6884472 to your computer and use it in GitHub Desktop.
Scenario: Updating profile picture
  Given I am logged in
  When I change my profile picture
  Then my profile should be updated
  And I should see the new profile picture
When /^I change my profile picture$/ do
  visit("/user/profile")
  within("form[@action=\"/user/profile\"]") do
    attach_file "profile_icon[file]", File.expand_path("features/static/photo.png")
    click_on "Save Changes"
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment