Extract EE specific files/lines for some spec/lib
We have the following files containing EE specific code. We should move them to ee/
spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb
diff --git a/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb
index a0fb86345f3..8ba9f34da3c 100644
--- a/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
describe SystemCheck::App::GitUserDefaultSSHConfigCheck do
+ include ::EE::GeoHelpers
+
let(:username) { '_this_user_will_not_exist_unless_it_is_stubbed' }
let(:base_dir) { Dir.mktmpdir }
let(:home_dir) { File.join(base_dir, "/var/lib/#{username}") }
@@ -70,6 +72,7 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do
end
def stub_user
+ allow(File).to receive(:expand_path).and_call_original
allow(File).to receive(:expand_path).with("~#{username}").and_return(home_dir)
end
Edited by Yorick Peterse