Add a test-case for GH #13825
This commit is contained in:
parent
f5c3531ade
commit
0a43bf3146
@ -22,8 +22,14 @@ def expects_exec(exe)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user