Last active
August 29, 2015 14:02
-
-
Save dajulia3/8bb620f3a768c1aa18e4 to your computer and use it in GitHub Desktop.
use_route without monkey patching for engine controller tests
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
#...... | |
#A bunch of spec_helper code.... | |
Rspec.configure do |config| | |
module UseRoutesForControllerTests | |
def self.included(base) | |
base.class_eval do | |
routes { MyEngine::Engine.routes } | |
end | |
end | |
end | |
config.include UseRoutesForControllerTests, type: :controller | |
end | |
#... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment