From 7dbc6d6979aec1ce7364269360d277fa2499e919 Mon Sep 17 00:00:00 2001 From: Dan Jensen Date: Mon, 11 Jun 2018 15:54:25 -0400 Subject: Fix bug with eager_load in development environment Modifies the routes simulator to allow for empty RouteSets, which are created when secondary Engines are loaded. --- actionpack/test/journey/router_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/journey/router_test.rb') diff --git a/actionpack/test/journey/router_test.rb b/actionpack/test/journey/router_test.rb index 183f421bcf..1f4e14aef6 100644 --- a/actionpack/test/journey/router_test.rb +++ b/actionpack/test/journey/router_test.rb @@ -493,6 +493,15 @@ module ActionDispatch assert_not called end + def test_eager_load_with_routes + get "/foo-bar", to: "foo#bar" + assert_nil router.eager_load! + end + + def test_eager_load_without_routes + assert_nil router.eager_load! + end + private def get(*args) -- cgit v1.2.3