module RSpec::Rails::ControllerExampleGroup

def bypass_rescue

end
end
end.to raise_error(/403 Forbidden/)
get :show, :id => profile.id + 1
bypass_rescue
expect do

login_as profile.user
profile = create_profile
it "raises a 403 when a non-admin user tries to view another user's profile" do
describe ProfilesController do

@example

conditions.
specify that an action _should_ raise an exception given appropriate
`rescue_with_handler` to raise the exception passed to it. Use this to
Extends the controller with a module that overrides
def bypass_rescue
  controller.extend(BypassRescue)
end

def method_missing(method, *args, &block)

this controller.
If method is a named_route, delegates to the RouteSet associated with
def method_missing(method, *args, &block)
  if @routes && @routes.named_routes.helpers.include?(method)
    controller.send(method, *args, &block)
  elsif defined?(@orig_routes) && @orig_routes && @orig_routes.named_routes.helpers.include?(method)
    controller.send(method, *args, &block)
  else
    super
  end
end

def routes=(routes)

Other tags:
    Api: - private
def routes=(routes)
  @routes = routes
  assertion_instance.instance_variable_set(:@routes, routes)
end