Created
December 6, 2008 00:21
-
-
Save emk/32568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gotcha! articles_controller.rb is getting loaded twice | |
# and registering our sweepers twice. | |
# | |
# This was the critical hint: | |
# http://blog.pastie.org/2008/12/passenger-wtf-1-nilcontroller_name-in-sweepers-module.html | |
mephisto (rails-2.2)$ ruby test/functional/admin/articles_controller_permissions_test.rb | |
Setting up Admin::SectionsController | |
Setting up Admin::SectionsController | |
Loaded suite test/functional/admin/articles_controller_permissions_test | |
Started | |
Setting controller articles to nil in #<AssignedSectionSweeper:0x24d7180> | |
Setting controller articles to nil in #<ArticleSweeper:0x24da90c> | |
Controller missing in #<AssignedSectionSweeper:0x24d7180> | |
Controller missing in #<ArticleSweeper:0x24da90c> | |
E | |
... | |
1) Error: | |
test_should_create_article(Admin::ArticlesControllerPermissionsTest): | |
NoMethodError: You have a nil object when you didn't expect it! | |
The error occurred while evaluating nil.controller_name | |
/Users/emk/w/src/mephisto/vendor/rails/actionpack/lib/action_controller/caching/sweeping.rb:87:in `callback' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment