Rails not finding steps

Environment:

Rails 4.2.4, Ruby 2.2.3, Cucumber-Rails 1.4.3

Result:

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 steps. I have my steps.rb within step_definitions within /features.

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

First time Cucumber user with Rails. What am I missing?

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

上一篇: 黄瓜统计宝石不起作用

下一篇: Rails没有找到步骤