aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/unit
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-04-28 14:26:33 -0700
committerPiotr Sarnacki <drogus@gmail.com>2012-04-28 14:38:12 -0700
commit28844aeac5f303c33a63e535a794fe6883fd0bef (patch)
tree39f2e67c3ce9b212cbfebba217565e1329385c97 /railties/test/unit
parent5c18bdca321c9152ad2770a029636b9351e91666 (diff)
downloadrails-28844aeac5f303c33a63e535a794fe6883fd0bef.tar.gz
rails-28844aeac5f303c33a63e535a794fe6883fd0bef.tar.bz2
rails-28844aeac5f303c33a63e535a794fe6883fd0bef.zip
Add a failing test for #5764
Diffstat (limited to 'railties/test/unit')
-rw-r--r--railties/test/unit/engine_test.rb16
1 files changed, 16 insertions, 0 deletions
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