diff options
author | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2019-02-28 19:57:34 +0100 |
commit | 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch) | |
tree | c3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /spec/lib/system_check/app | |
parent | f6453eca992a9c142268e78ac782cef98110d183 (diff) | |
download | gitlab-ce-tc-standard-gem.tar.gz |
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I
decided to try https://github.com/testdouble/standard on our codebase.
It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'spec/lib/system_check/app')
-rw-r--r-- | spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb b/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb index a0fb86345f3..5d68bbf5346 100644 --- a/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb +++ b/spec/lib/system_check/app/git_user_default_ssh_config_check_spec.rb @@ -1,11 +1,11 @@ -require 'spec_helper' +require "spec_helper" describe SystemCheck::App::GitUserDefaultSSHConfigCheck do - let(:username) { '_this_user_will_not_exist_unless_it_is_stubbed' } + 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}") } - let(:ssh_dir) { File.join(home_dir, '.ssh') } - let(:forbidden_file) { 'id_rsa' } + let(:ssh_dir) { File.join(home_dir, ".ssh") } + let(:forbidden_file) { "id_rsa" } before do allow(Gitlab.config.gitlab).to receive(:user).and_return(username) @@ -15,16 +15,16 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do FileUtils.rm_rf(base_dir) end - it 'only whitelists safe files' do + it "only whitelists safe files" do expect(described_class::WHITELIST).to contain_exactly( - 'authorized_keys', - 'authorized_keys2', - 'authorized_keys.lock', - 'known_hosts' + "authorized_keys", + "authorized_keys2", + "authorized_keys.lock", + "known_hosts" ) end - describe '#skip?' do + describe "#skip?" do subject { described_class.new.skip? } where(user_exists: [true, false], home_dir_exists: [true, false]) @@ -41,14 +41,14 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do end end - describe '#check?' do + describe "#check?" do subject { described_class.new.check? } before do stub_user end - it 'fails if a forbidden file exists' do + it "fails if a forbidden file exists" do stub_ssh_file(forbidden_file) is_expected.to be_falsy @@ -60,7 +60,7 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do is_expected.to be_truthy end - it 'succeeds if all the whitelisted files exist' do + it "succeeds if all the whitelisted files exist" do described_class::WHITELIST.each do |filename| stub_ssh_file(filename) end |