I recently upgraded by current app to Rails 3.2.8 and can't get a few tests to pass. I made a helper method that merges certain hashes with the params hash and creates a link to the current page. I used technique I saw on: link_to the current page plus/merged with a param.
Here is a stripped down version:
def simple_link
link_to "Page", params.merge(:c => nil)
end
Then I would test it with something like:
describe "simple_link" do
it { simple_link.should == "<a href=\"/assets\">Page</a>" }
end
Which was passing in 3.2.6.
However, now I receive the rspec error No route matches {:c=>nil}
. Either Rails, rspec, or capybara is thinking the hash is the route. If I add a proper route like: users_path
, then url_for seems to pick up the hash. Testing on a browser, everything works fine, no errors. Am I doing something wrong, was something changed in 3.2.8 or is this a bug?