1
我使用Ryan Bates頗爲可愛的nested form gem。它可以正常使用,但我沒有找到用黃瓜進行測試的方法。我沒有試圖測試寶石本身,而是在完成表格後我的網站的行爲。如何使用黃瓜測試使用nested_form gem的表單?
我使用的步驟與我在網站上使用的步驟完全相同。
Then I should see "Add a question" # features/step_definitions/web_steps.rb:105
When I follow "Add a question" # features/step_definitions/web_steps.rb:56
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[] (NoMethodError)
你在這個時候是否啓用了黃瓜的javascript引擎? – tal