Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow testing of ApplicationController subclasses with controller()
- Loading branch information
1 parent
59c83c6
commit 48a231e
Showing
2 changed files
with
69 additions
and
22 deletions.
There are no files selected for viewing
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
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
48a231e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused why you would ever need to use
controller
on a subclass of ApplicationController. The primary reason this method exists is to test ApplicationController because it contains no "actions". I assume your subclasses contain actions (which can be mocked to raise AccessDenied)?48a231e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, nevermind, I see the use case in namespaced controllers with the namespace having its own "application_controller"