diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-04-28 15:05:49 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-04-28 15:05:49 -0700 |
commit | 1823d53d7bfa1625fb146c56e12a586aac7426fc (patch) | |
tree | f8a9caaa7d30806b32d7e154ae74aa04d1e37cae | |
parent | 5a2fdaa27796502daf0fb2314e599b76049296d4 (diff) | |
download | rails-1823d53d7bfa1625fb146c56e12a586aac7426fc.tar.gz rails-1823d53d7bfa1625fb146c56e12a586aac7426fc.tar.bz2 rails-1823d53d7bfa1625fb146c56e12a586aac7426fc.zip |
Don't create new directory for tests
-rw-r--r-- | railties/test/engine_test.rb | 24 | ||||
-rw-r--r-- | railties/test/unit/engine_test.rb | 26 |
2 files changed, 24 insertions, 26 deletions
diff --git a/railties/test/engine_test.rb b/railties/test/engine_test.rb new file mode 100644 index 0000000000..68406dce4c --- /dev/null +++ b/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 diff --git a/railties/test/unit/engine_test.rb b/railties/test/unit/engine_test.rb deleted file mode 100644 index 02d40d97f6..0000000000 --- a/railties/test/unit/engine_test.rb +++ /dev/null @@ -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 |