Rails没有找到步骤

环境:

Rails 4.2.4,Ruby 2.2.3,Cucumber-Rails 1.4.3

结果:

Feature: List Posts
The current user should be able to view the blog index.

Rules:
- Well, there really are no rules except being able to browse to blog index URL.

Scenario: without a date param # features/list_posts.feature:8
Given: there are 3 posts
When: I visit the posts index without a date param
Then: I should see 3 posts

Scenario: with a date param # features/list_posts.feature:13
Given: there are 3 posts
When: I query for posts published in October 2010
Then: I will see 1 post

2 scenarios (2 passed)
0 steps
0m0.039s

0步。 我在/ features中的step_definitions中有我的steps.rb。

cucumber.yml =

<% rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

第一次使用Rails的Cucumber用户。 我错过了什么?

链接地址: http://www.djcxy.com/p/6607.html

上一篇: Rails not finding steps

下一篇: `sysread': end of file reached (EOFError)