Ruby on rails 3 Cabybara和路由参数s

Ruby on rails 3 Cabybara和路由参数s,ruby-on-rails-3,capybara,Ruby On Rails 3,Capybara,我有一个Rails 3.0.10应用程序,其中一些前端表单使用路由参数 但我一直在思考如何让水豚访问这些动态路径 routes.rb match "weather/:region/:reporter" => "weather#new", :as => 'weather_report' 在我的集成测试中,我有以下几点: visit weather_report_path(:region => 'north', :reporter => 'alex' ) 这给了我一个机会

我有一个Rails 3.0.10应用程序,其中一些前端表单使用路由参数 但我一直在思考如何让水豚访问这些动态路径

routes.rb

match "weather/:region/:reporter" => "weather#new", :as => 'weather_report'
在我的集成测试中,我有以下几点:

visit weather_report_path(:region => 'north', :reporter => 'alex' )
这给了我一个机会

NoMethodError:
       undefined method `weather_report' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007f97084a3e08>
命名错误:
未定义的方法“天气报告”#
如果我试图在集成测试中硬编码路径

例如:
访问“天气/东南/亚历克斯”

水豚进入主页


任何方向正确的指导都将不胜感激。

那么您使用的是哪种框架?Rspec,黄瓜,测试::单位?我只是用RSpec和水豚。