Created
December 15, 2009 16:20
-
-
Save felixflores/257052 to your computer and use it in GitHub Desktop.
This file contains 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
Feature: Managing movies | |
In order manage movies | |
As an authorized user | |
I want to be able to manage movies | |
Background: Only authenticated users can add movies | |
Given a user is logged in as "[email protected]" | |
Given /^a user is logged in as "(.*)"$/ do |email| | |
user = Factory(:user, :email => email) | |
visit "/login" | |
fill_in("Email", :with => user.email) | |
fill_in("Password", :with => user.password) | |
click_button("Login") | |
response.should contain("Login successful!") | |
end | |
Factory.define :user do |user| | |
user.sequence(:email) { |n| "foo#{n}@example.com" } | |
user.password "foobar" | |
user.password_confirmation { |u| u.password } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment