单元测试中的“ActionController :: RoutingError:No route matches”错误

时间:2012-07-30 20:50:41

标签: ruby-on-rails ruby unit-testing teamcity rake-test

我在Continous Integration服务器上运行单元集成测试。我使用相同的格式得到其中3个错误,这里是测试“PaymentMethodsControllerTest.test_should_update_active_field”的示例:

ActionController::RoutingError: No route matches {:id=>"380742408", :active=>false, :controller=>"payment_methods", :action=>"update_active"}

Stack trace:
test/functional/payment_methods_controller_test.rb:61:in `block in <class:PaymentMethodsControllerTest>'

这些是其他的:  ProductsControllerTest.test_should_update_active_field:

ActionController::RoutingError: No route matches {:id=>"9854742", :active=>false, :controller=>"products", :action=>"update_status"}

Stack trace:
test/functional/products_controller_test.rb:61:in `block in <class:ProductsControllerTest>'

SectionsControllerTest.test_should_update_active_field:

ActionController::RoutingError: No route matches {:id=>"260276858", :active=>false, :controller=>"sections", :action=>"update_status"}

Stack trace:
test/functional/sections_controller_test.rb:54:in `block in <class:SectionsControllerTest>'

开发人员声称他们的测试在他们的环境中运行正常,但不是我。我正在使用ruby 1.9.2p320,Rails 3.2.0

0 个答案:

没有答案