Я пытаюсь запустить тест
describe "CreateFolders" do
describe "GET /projects" do
it "new folder", :js => true do
@user = FactoryGirl.create(:user)
visit projects_path
fill_in('user_Login', :with => @user.email)
fill_in('user_password', :with => @user.password)
click_button('Sign in')
page.should have_content('Logged in')
end
end
Я вижу
Failures:
1) CreateFolders GET /projects new folder
Failure/Error: page.should have_content('Logged in')
expected there to be content "Logged in" in "Invalid email or password.\nSign in\nRemember me\nForgot your password?"
# ./spec/requests/create_folders_spec.rb:17:in `block (3 levels) in <top (required)>'
============================================================================= ОБНОВЛЕНО
FactoryGirl.define do
factory :user do
email Faker::Internet.free_email
password 'password'
Name Faker::Name.first_name
Surname Faker::Name.last_name
Phone Faker::PhoneNumber.phone_number
Login Faker::Name.first_name
company {|user| user.association(:company) }
end
end