Feature: Home page
As a HR manager of a company I am visiting the digipresent app for the first time
I want to be welcomed with a greeting
Scenario: User sees the welcome message
When: he goes to home page
Then: he should see the welcome message
此文件名为features/home_page.feature
When (/^he goes to the home page$/) do
visit root_path
end
Then (/^he should see the welcome message$/)do
expect(page).to have_content("Welcome to Present")
end
此文件显示为features/step_definitions/home_page_steps.rb
$cucumber --require features features/home_page.feature
当我这样做时,步骤无法识别。
Feature: Home page
As a HR manager of a company I am visiting the digipresent app for the first time
I want to be welcomed with a greeting
Scenario: User sees the welcome message # features/home_page.feature:5
When: he goes to home page
Then: he should see the welcome message
1 scenario (1 passed)
0 steps
0m0.023s
答案 0 :(得分:0)
之后没有分号
Cat....1
Dog....1
Dog....2
Phone...1
Computer...1
Computer...2
Computer...3
这应该有效