Specifies the routeset that will be used for the example group. This is most useful when testing Rails engines.
@example
describe MyEngine::PostsController do
routes { MyEngine::Engine.routes }
it "routes posts#index" do
expect(:get => "/posts").to
route_to(:controller => "my_engine/posts", :action => "index")
end
end
# File lib/rspec/rails/example/routing_example_group.rb, line 25 def routes(&blk) before do self.routes = blk.call end end
Generated with the Darkfish Rdoc Generator 2.