diff options
author | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-06-07 10:23:45 +0200 |
---|---|---|
committer | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-06-07 10:23:45 +0200 |
commit | 1a06530aa50e1aed5c7dff6f1256abb555c497b6 (patch) | |
tree | d5c44d72394fb40fdc2c78b5bdd15118cf40a04e | |
parent | 402163916b0d65c33208f3ebf1a488dce93d7ad3 (diff) | |
download | rails-1a06530aa50e1aed5c7dff6f1256abb555c497b6.tar.gz rails-1a06530aa50e1aed5c7dff6f1256abb555c497b6.tar.bz2 rails-1a06530aa50e1aed5c7dff6f1256abb555c497b6.zip |
Added regression tests
-rw-r--r-- | railties/test/railties/generators_test.rb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/railties/test/railties/generators_test.rb b/railties/test/railties/generators_test.rb index e32970c2e5..69ba03673e 100644 --- a/railties/test/railties/generators_test.rb +++ b/railties/test/railties/generators_test.rb @@ -1,16 +1,6 @@ -require 'fileutils' +RAILS_ISOLATION_COMMAND = "engine" +require "isolation/abstract_unit" -require 'test/unit' -require 'rubygems' - -# TODO: Remove setting this magic constant -RAILS_FRAMEWORK_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../..") - -# These files do not require any others and are needed -# to run the tests -require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/testing/isolation" -require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/testing/declarative" -require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/core_ext/kernel/reporting" require "#{RAILS_FRAMEWORK_ROOT}/railties/lib/rails/generators/test_case" module RailtiesTests @@ -70,6 +60,7 @@ module RailtiesTests Dir.chdir(engine_path) do bundled_rails("g controller topics") assert_file "app/controllers/foo_bar/topics_controller.rb", /FooBar::TopicsController/ + assert_no_file "app/controllers/topics_controller.rb" end end @@ -77,6 +68,7 @@ module RailtiesTests Dir.chdir(engine_path) do bundled_rails("g model topic") assert_file "app/models/foo_bar/topic.rb", /FooBar::Topic/ + assert_no_file "app/models/topic.rb" end end @@ -84,6 +76,7 @@ module RailtiesTests Dir.chdir(engine_path) do bundled_rails("g helper topics") assert_file "app/helpers/foo_bar/topics_helper.rb", /FooBar::TopicsHelper/ + assert_no_file "app/helpers/topics_helper.rb" end end end |