diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/generators_test_helper.rb | 2 | ||||
-rw-r--r-- | railties/test/initializer/path_test.rb | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb index 35567f7929..54953b76c8 100644 --- a/railties/test/generators/generators_test_helper.rb +++ b/railties/test/generators/generators_test_helper.rb @@ -1,5 +1,3 @@ -# TODO: Fix this RAILS_ENV stuff -RAILS_ENV = 'test' unless defined?(RAILS_ENV) require 'abstract_unit' module Rails diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index bfb1887d11..328dda6d2c 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -63,7 +63,7 @@ module InitializerTests end test "environments has a glob equal to the current environment" do - assert_equal "#{RAILS_ENV}.rb", @paths.config.environments.glob + assert_equal "#{Rails.env}.rb", @paths.config.environments.glob end test "load path includes each of the paths in config.paths as long as the directories exist" do @@ -85,17 +85,17 @@ module InitializerTests end test "controller paths include builtin in development mode" do - RAILS_ENV.replace "development" + Rails.env.replace "development" assert Rails::Configuration.new.paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in test mode" do - RAILS_ENV.replace "test" + Rails.env.replace "test" assert !Rails::Configuration.new.paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end test "controller paths does not have builtin_directories in production mode" do - RAILS_ENV.replace "production" + Rails.env.replace "production" assert !Rails::Configuration.new.paths.app.controllers.paths.any? { |p| p =~ /builtin/ } end |