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:
parent
f5c3531ade
commit
0a43bf3146
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue