1
私の仕様には存在しません:。Authlogicセッションはすぐに
let(:user) { FactoryGirl.create(:user) }
context 'When user is logged in' do
scenario 'Log in' do
visit login_path
within '.new_user_session' do
fill_in 'username', with: user.email
fill_in 'password', with: user.password
click_on 'Log in'
end
visit new_search_path
expect(page).to have_text "Welcome #{user.name}!"
end
end
問題new_search_path
を訪問したときに、成功でログインが、ページの動作にもかかわらず、ログインユーザがいないかのようにということであればvisit new_search_path
の直前にsleep(1)
コールを追加すると、すべて正常に動作します。
これはなぜ起こっているのですか?
私はauthlogic、capybara、およびseleniumを使用しています。