Created
April 24, 2013 03:25
-
-
Save irissilvermoon/5449368 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
#factory: | |
FactoryGirl.define do | |
factory :user do | |
email "wishlist@example.com" | |
username "User" | |
password "password" | |
password_confirmation "password" | |
factory :confirmed_user do | |
sequence(:email) { |n| "wishlist#{n}@example.com" } | |
after_create do |user| | |
user.confirm! | |
end | |
end | |
end | |
end | |
#test: | |
require 'spec_helper' | |
feature 'User Profiles' do | |
let!(:user) { Factory(:confirmed_user) } | |
before do | |
sign_in_as!(user) | |
visit '/' | |
click_link 'Profile' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment