나는 오이 단계 정의가 개체에서 선택되지 않습니다.오이 단계 정의가 클래스를 찾을 수 없음
오류는 다음과 같습니다
| title | description |
| First Issue | This is a first issue. |
undefined method `issues' for nil:NilClass (NoMethodError)
./features/step_definitions/issue_steps.rb:3:in `block (2 levels) in <top (required)>'
특징 :
Background:
Given there is a release called "First Release"
And that release has a feature:
| title | description |
| Make it shiny! | Gradients! Starbursts! Oh my! |
And that feature has a issue:
| title | description |
| First Issue | This is a first issue. |
And I am on the homepage
경로 :
resources :releases do
resources :features
end
resources :features do
resources :issues
end
단계 정의 :
Given /^that feature has a issue:$/ do |table|
table.hashes.each do |attributes|
@feature.issues.create!(attributes)
end
end
스텝 정의 : 기능
Given /^that release has a feature:$/ do |table|
table.hashes.each do |attributes|
@release.features.create!(attributes)
end
end
'및 그 릴리스에는 기능이 있습니다 :' – Gazler
에 대한 단계 정의를 게시하십시오. 지금 해본 적이 있는데, 필요한 것이 있으면 알려주세요. – user979587