黄瓜 - 铁路没有找到步骤

时间:2016-05-01 21:01:38

标签: ruby-on-rails cucumber

环境:

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用户。我错过了什么?

0 个答案:

没有答案