Permalink
Browse files

Display mounted engines in `rake routes` by default

  • Loading branch information...
1 parent fcacc69 commit c9bb099318dd3bc293a6cb4672333147c1cce4b9 @drogus drogus committed Nov 25, 2011
@@ -1,6 +1,6 @@
## Rails 3.2.0 (unreleased) ##
-* Add displaying of mounted engine's routes with `rake routes ENGINES=true` *Piotr Sarnacki*
+* Display mounted engine's routes in `rake routes`. *Piotr Sarnacki*
* Allow to change the loading order of railties with `config.railties_order=` *Piotr Sarnacki*
@@ -46,7 +46,7 @@ def collect_routes(routes)
end
def collect_engine_routes(name, rack_app)
- return unless rack_app && ENV["ENGINES"] && rack_app.respond_to?(:routes)
+ return unless rack_app && rack_app.respond_to?(:routes)
return if @engines[name]
routes = rack_app.routes
@@ -11,8 +11,6 @@ def setup
end
def test_displaying_routes_for_engines
- ENV["ENGINES"] = "true"
-
engine = Class.new(Rails::Engine) do
def self.to_s
"Blog::Engine"
@@ -35,8 +33,6 @@ def self.to_s
"cart GET /cart(.:format) cart#show"
]
assert_equal expected, output
- ensure
- ENV["ENGINES"] = nil
end
def test_cart_inspect

0 comments on commit c9bb099

Please sign in to comment.