From 28844aeac5f303c33a63e535a794fe6883fd0bef Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Sat, 28 Apr 2012 14:26:33 -0700 Subject: Add a failing test for #5764 --- railties/test/unit/engine_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 railties/test/unit/engine_test.rb (limited to 'railties/test/unit') diff --git a/railties/test/unit/engine_test.rb b/railties/test/unit/engine_test.rb new file mode 100644 index 0000000000..977f46ecea --- /dev/null +++ b/railties/test/unit/engine_test.rb @@ -0,0 +1,16 @@ +require 'abstract_unit' + +module Unit + class EngineTest < ActiveSupport::TestCase + it "reports routes as available only if they're actually present" do + engine = Class.new(Rails::Engine) do + def initialize(*args) + @routes = nil + super + end + end + + assert !engine.routes? + end + end +end -- cgit v1.2.3