에서 사용되지 않는 경우/:을 감안할 때/그리고 오이
WARNING: Using 'Given/When/Then' in step definitions is deprecated, use 'step' to call other steps instead
어떻게이 문제를 해결 할 수 있습니까?
코드 :
Feature: Viewing tickets
In order to view the tickets for a project
As a user
I want to see them on that project's page
Background:
Given there is a project called "TextMate 2"
And that project has a ticket:
| title | description |
| Make it shiny! | Gradients! Starbursts! Oh my! |
And there is a project called "Internet Explorer"
And that project has a ticket:
| title | description |
| Standards compliance | Isn't a joke. |
And I am on the homepage
Scenario: Viewing tickets for a given project
When I follow "TextMate 2"
Then I should see "Make it shiny!"
And I should not see "Standards compliance"
When I follow "Make it shiny!"
Then I should see "Make it shiny" within "#ticket h2"
And I should see "Gradients! Starbursts! Oh my!"
When I am on the homepage
And I follow "Internet Explorer"
Then I should see "Standards compliance"
And I should not see "Make it shiny!"
When I follow "Standards compliance"
Then I should see "Standards compliance" within "#ticket h2"
And I should see "Isn't a joke.
고마워요!
Then "a file named '#{want_file}' should exist"
대신 당신이
step("a file named '#{want_file}' should exist")
를 사용해야하거나 (I 생각 선호) - 전혀 다른에서 한 단계를 호출하지 않도록 :
이는 피쳐 파일 코드가 아닌 단계 정의에 기인합니다. 스텝 정의 코드를 게시 할 수 있습니까? –
단일 단계에 대해 단계 방법을 사용하거나 여러 단계에 대해 단계를 사용할 수 있습니다. 내 대답을 참조하십시오 http://stackoverflow.com/questions/918066/reuse-cucumber-steps/8395715#8395715 – michaeltwofish