module RSpec::Rails::RoutingExampleGroup::ClassMethods
Class-level DSL for route specs.
Public Instance Methods
Source
# File lib/rspec/rails/example/routing_example_group.rb, line 31 def routes before do self.routes = yield end end
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