diff options
Diffstat (limited to 'railties/test/engine_test.rb')
-rw-r--r-- | railties/test/engine_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/railties/test/engine_test.rb b/railties/test/engine_test.rb index addf49cdb6..f46fb748f5 100644 --- a/railties/test/engine_test.rb +++ b/railties/test/engine_test.rb @@ -1,7 +1,7 @@ require 'abstract_unit' class EngineTest < ActiveSupport::TestCase - it "reports routes as available only if they're actually present" do + test "reports routes as available only if they're actually present" do engine = Class.new(Rails::Engine) do def initialize(*args) @routes = nil @@ -11,4 +11,15 @@ class EngineTest < ActiveSupport::TestCase assert !engine.routes? end + + def test_application_can_be_subclassed + klass = Class.new(Rails::Application) do + attr_reader :hello + def initialize + @hello = "world" + super + end + end + assert_equal "world", klass.instance.hello + end end |