我试图将我的应用程序从Rails 3.2.x移植到Rails 4.0.4.所有的宝石都已经兼容,我正处于修复失败测试的阶段.
我有这种奇怪的测试失败.
我的routes.rb
resources :my_reports,only: [:index] do collection do get "/report/:filename",to: :show,prefix: "pri/excl/rep",as: :show end end@H_404_7@我的规范已经在Rails 3.2.x中传递,现在在更新到4.0.4后失败了
describe MyReportsController do describe "#show" do def make_request get :show,prefix: 'some/place',filename: 'foo',format: 'doc' end it "makes a simple request" do make_request end end end@H_404_7@我收到以下错误
Failure/Error: get :show,format: 'doc' ActionController::UrlGenerationError: No route matches {:action=>"show",:controller=>"my_reports",:filename=>"foo",:format=>"doc",:prefix=>"some/place"}@H_404_7@我被困在这一点,欢迎提示.我正在使用rspec和rspec-rails版本2.14.1.