失败测试显示在日志之后 (::)失败的步骤(::)
No route matches "/wiki/Baltimore_Ravens" (ActionController::RoutingError)
<internal:prelude>:10:in `synchronize'
./features/step_definitions/web_steps.rb:20:in `/^(?:|I )am on (.+)$/'
features/annotate.feature:7:in `Given I am on a web page'
Failing Scenarios:
cucumber features/annotate.feature:11 # Scenario: launch annotation/ logged in
56 scenarios (1 failed, 5 skipped, 50 passed)
413 steps (1 failed, 62 skipped, 350 passed)
名为web_steps.rb的文件。行号20是:
19 Given /^(?:|I )am on (.+)$/ do |page_name|
20 visit path_to(page_name)
21 end
名为annotate.feature的文件。行号7
6 Background:
7 Given I am on a web page
8 And I am logged in
答案 0 :(得分:0)
您需要在 path_to 方法中的 support / paths.rb 中定义页面路径
when /^a web page$/
path of web page from rake route commnad