diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/unit/engine_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/unit/engine_test.rb b/railties/test/unit/engine_test.rb index 977f46ecea..02d40d97f6 100644 --- a/railties/test/unit/engine_test.rb +++ b/railties/test/unit/engine_test.rb @@ -12,5 +12,15 @@ module Unit assert !engine.routes? end + + it "does not add more paths to routes on each call" do + engine = Class.new(Rails::Engine) + + engine.routes + length = engine.routes.draw_paths.length + + engine.routes + assert_equal length, engine.routes.draw_paths.length + end end end |