Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't create new directory for tests

  • Loading branch information...
commit 1823d53d7bfa1625fb146c56e12a586aac7426fc 1 parent 5a2fdaa
@drogus drogus authored
Showing with 24 additions and 26 deletions.
  1. +24 −0 railties/test/engine_test.rb
  2. +0 −26 railties/test/unit/engine_test.rb
View
24 railties/test/engine_test.rb
@@ -0,0 +1,24 @@
+require 'abstract_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
+
+ 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
View
26 railties/test/unit/engine_test.rb
@@ -1,26 +0,0 @@
-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
-
- 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
Please sign in to comment.
Something went wrong with that request. Please try again.