Permalink
Browse files

Adds a bit more clarifying details

  • Loading branch information...
alindeman committed Dec 27, 2013
1 parent 7b2d363 commit 8c2a38abd05e579ca8fba90d06258041333185c7
Showing with 6 additions and 2 deletions.
  1. +6 −2 features/controller_specs/anonymous_controller.feature
@@ -9,15 +9,19 @@ Feature: anonymous controller
controller(BaseController)
- You can disable base type inference:
+ You can also disable base type inference, in which case anonymous
+ controllers will inherit from `ApplicationController` instead of
+ the described class by default:
Rspec.configure do |c|
c.infer_base_class_for_anonymous_controllers = false
end
describe BaseController do
controller { ... }
- # ^^ creates an anonymous subclass of `ApplicationController`
+ # ^^ would normally create an anonymous subclass of `BaseController`,
+ # but since `infer_base_class_for_anonymous_controllers` is disabled,
+ # it creates a subclass of `ApplicationController` instead
Scenario: specify error handling in ApplicationController
Given a file named "spec/controllers/application_controller_spec.rb" with:

0 comments on commit 8c2a38a

Please sign in to comment.