Skip to content
Browse files

Revert "Define name before subclassing in anonymous controller spec"

- this had been done to get around a problem in rails-3.1.0.beta1, but
  that issue has been addressed in the coming rails-3.1.0.rc

This reverts commit 9ebf963.
  • Loading branch information...
1 parent 94f6bfa commit 59e3c45ab21f9a4358bebf38dc9993e0e93a8e51 @dchelimsky dchelimsky committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/rspec/rails/example/controller_example_group.rb
8 lib/rspec/rails/example/controller_example_group.rb
@@ -125,9 +125,11 @@ def controller_class
# defined in +ApplicationController+, however, are accessible from within
# the block.
def controller(base_class = ApplicationController, &body)
- base_class.dup.tap do |new_base|
- def; "StubResourcesController"; end
- metadata[:example_group][:describes] =, &body)
+ metadata[:example_group][:describes] =, &body)
+ metadata[:example_group][:describes].singleton_class.class_eval do
+ def name
+ "StubResourcesController"
+ end
before do

0 comments on commit 59e3c45

Please sign in to comment.
Something went wrong with that request. Please try again.