这是一个黄瓜场景:
Scenario: Login
Given the user is on Login page
When I sign in
我的步骤定义:
When /I sign in/ do
within("#mypage") do
fill_in 'login_id', :with => 'ccd'
fill_in 'password', :with => 'coffee'
end
click_button 'Login'
visit '/feedbacks/'
end
当我运行黄瓜时,我收到以下错误:
Scenario: Login # features\heartbeat_tests.feature:20
Given the user is on Login page # features/step_definitions/heartbeat_definitions.rb:5
When I sign in # features/step_definitions/heartbeat_definitions.rb:18
undefined method `each' for nil:NilClass (ActionView::Template::Error)
D:/shoutout_web/app/views/layouts/application.html.erb:256:in
`_app_views_layouts_application_html_erb__124036717_28160832'