1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add a test-case for GH #13825

This commit is contained in:
Guillermo Iguaran 2014-01-24 14:10:46 -05:00
parent f5c3531ade
commit 0a43bf3146

View file

@ -22,8 +22,14 @@ class AppRailsLoaderTest < ActiveSupport::TestCase
exe = "#{script_dir}/rails"
test "is not in a Rails application if #{exe} is not found in the current or parent directories" do
File.stubs(:exist?).with('bin/rails').returns(false)
File.stubs(:exist?).with('script/rails').returns(false)
File.stubs(:file?).with('bin/rails').returns(false)
File.stubs(:file?).with('script/rails').returns(false)
assert !Rails::AppRailsLoader.exec_app_rails
end
test "is not in a Rails application if #{exe} exists but is a folder" do
FileUtils.mkdir_p(exe)
assert !Rails::AppRailsLoader.exec_app_rails
end