Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/60.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 黄瓜试验无效-设计_Ruby On Rails_Cucumber - Fatal编程技术网

Ruby on rails 黄瓜试验无效-设计

Ruby on rails 黄瓜试验无效-设计,ruby-on-rails,cucumber,Ruby On Rails,Cucumber,情景: Feature: Login Success Scenario: Login in User Given I am on the sign_in page And I fill in "Email" with "test@gmail.com" And I fill in "Password" with "12345678" When I press "Sign in" Then page should have content "Updat

情景:

Feature: Login Success

  Scenario: Login in  User
    Given I am on the sign_in page
    And I fill in "Email" with "test@gmail.com"
    And I fill in "Password" with "12345678"
    When I press "Sign in"
    Then page should have content "Update Projects"
我正在使用这个装置

步骤:

Given /^I am on the sign_in page$/ do
  visit ('/users/sign_in')
end

Given /^I fill in "(.*?)" with "(.*?)"$/ do |arg1, arg2|
  fill_in arg1, :with => arg2
end

When /^I press "(.*?)"$/ do |arg1|
  click_button arg1
end

Then /^page should have content "(.*?)"$/ do |arg1|
  expect(page).to have_content arg1
end
很简单。我正在使用这个装置

为什么失败:

希望在中找到文本“更新项目”

cucumber为什么不重定向到下一页