此功能工作了一下,然后停止工作。使用黄瓜和设计登录失败,没有消息
Background:
Given a user is logged in
Then I should see "Signed in successfully."
随着
Given /^a user is logged in$/ do
@user = FactoryGirl.create(:user)
@user.confirm!
visit new_user_session_path
fill_in 'Email', :with => @user.email
fill_in 'Password', :with => @user.password
click_on 'Sign in'
end
Then /^I should see "(.*?)"$/ do |message|
page.should have_content(message)
end
Given a user is logged
在通行证但Then I should see "Signed in successfully."
失败,错误expected there to be content "Signed in successfully."
。 它保留在页面的登录中。
任何人都有一个想法可能是什么问题?
请注意,我不喜欢在功能描述中过于具体,因为客户端并不真正在意细节。我宁愿在台阶上。 –
会话控制器中的'new'操作可能无法对用户进行身份验证,从而重新呈现登录页面 – cdesrosiers
身份验证适用于浏览器。这绝对是一些步骤。谢谢! –