【发布时间】:2011-07-10 20:18:20
【问题描述】:
页面网址类似于/people?search=name
当我使用水豚的current_path 方法时,它只返回/people。
current_path.should == people_path(:search => 'name')
但它失败了
expected: "/people?search=name"
got: "/people"
我们怎样才能让它通过?有没有办法做到这一点?
【问题讨论】:
-
"/people?search=name"is not a path。"/people"是路径
标签: ruby-on-rails ruby-on-rails-3 rspec capybara