任何人都知道如何讓使用硒的webrat使用assert_response?我不斷收到assert_response在selenium模式下不能與webrat搭配使用
NoMethodError: undefined method `response_code' for nil:NilClass
這裏是我的測試:
def test_basic_page_load
visit root_path
click_link "register"
assert_response 200
end
這裏的錯誤:
==> Waiting for Selenium RC server on port 4444... Ready!
==> Waiting for rails application server on port 3001... Ready!
E
1) Error:
test_basic_page_load(UserCrudTest):
NoMethodError: undefined method `response_code' for nil:NilClass
/test/integration/user_crud_test.rb:11:in `test_basic_page_load'
Finished in 12.269964 seconds.
我敢肯定,這是一些愚蠢的我失蹤,但我只是不」沒有看到它....任何想法?