How to get current path with query string using Capybara

The page url is something like /people?search=name while I used current_path method of capybara it returned /people only. current_path.should == people_path(:search => 'name') But it fails say...