diff options
Diffstat (limited to 'railties/test/app_loader_test.rb')
-rw-r--r-- | railties/test/app_loader_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/app_loader_test.rb b/railties/test/app_loader_test.rb index bb556f1968..0deb1a76df 100644 --- a/railties/test/app_loader_test.rb +++ b/railties/test/app_loader_test.rb @@ -9,12 +9,12 @@ class AppLoaderTest < ActiveSupport::TestCase @loader ||= Class.new do extend Rails::AppLoader - def self.exec_arguments - @exec_arguments - end + class << self + attr_accessor :exec_arguments - def self.exec(*args) - @exec_arguments = args + def exec(*args) + self.exec_arguments = args + end end end end @@ -40,13 +40,13 @@ class AppLoaderTest < ActiveSupport::TestCase test "is not in a Rails application if #{exe} is not found in the current or parent directories" do def loader.find_executables; end - assert !loader.exec_app + assert_not loader.exec_app end test "is not in a Rails application if #{exe} exists but is a folder" do FileUtils.mkdir_p(exe) - assert !loader.exec_app + assert_not loader.exec_app end ["APP_PATH", "ENGINE_PATH"].each do |keyword| @@ -61,7 +61,7 @@ class AppLoaderTest < ActiveSupport::TestCase test "is not in a Rails application if #{exe} exists but doesn't contain #{keyword}" do write exe - assert !loader.exec_app + assert_not loader.exec_app end test "is in a Rails application if parent directory has #{exe} containing #{keyword} and chdirs to the root directory" do @@ -76,7 +76,7 @@ class AppLoaderTest < ActiveSupport::TestCase # Compare the realpath in case either of them has symlinks. # - # This happens in particular in Mac OS X, where @tmp starts + # This happens in particular in macOS, where @tmp starts # with "/var", and Dir.pwd with "/private/var", due to a # default system symlink var -> private/var. assert_equal File.realpath("#@tmp/foo"), File.realpath(Dir.pwd) |