나는 오이와 카피 바라와 레일 3.0.7 프로젝트를 실행 그리고 난 플래시 경우 확인하는 단계 정의가 [: 오류가] 존재 : 내 오이 테스트를 실행하면Cucumber-Capybara로 플래시 변수가없는 것을 어떻게 선언합니까?
Then /^I should be able to see the main page properly$/ do
current_path.should == "/"
flash[:error].should == nil
end
, 내가 얻을를 오류
And I should be able to see the main page properly # features/step_definitions/user_auth_steps.rb:17
undefined method `flash' for nil:NilClass (NoMethodError)
./features/step_definitions/user_auth_steps.rb:19:in `/^I should be able to see the main page properly$/'
features/user_auth.feature:10:in `And I should be able to see the main page properly'
가변 어설 션을 처리하는 올바른 방법입니까? 나는 세션 [: 무언가]를 사용한다면 동일한 유형의 오류가 발생한다는 것을 알았다.