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