[rspec-users] RSpec 2: what should I replace 'params_from' with?
dchelimsky at gmail.com
Thu Jun 24 09:16:29 EDT 2010
On Jun 24, 2010, at 8:12 AM, Ivo Wever wrote:
> Thanks, that works fine and makes sense. Now there are also a few specs
> that assert the inverse direction:
> describe SessionsController do
> describe "route generation" do
> it "should route the destroy sessions action correctly" do
> route_for(:controller => 'sessions', :action => 'destroy').should
> == "/logout"
route_to delegates to assert_routing, which tests both sides (recognizes and generates).
> I understand the route_for method is similarly deprecated; what would be
> the idiomatic way to spec that now?
>> Note that the name RSpec::Rails::RoutingSpecMatchers might change in the
>> next beta, so this is not a formal API or anything - just a workaround
>> for you to get by until the next release.
> OK, thanks for the warning. As we consciously chose to move to -beta
> software, these kinds of things are expected :).
More information about the rspec-users