summaryrefslogtreecommitdiff
path: root/spec/gitlab_config_spec.rb
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-08-14 00:22:46 +0100
committerNick Thomas <nick@gitlab.com>2018-08-14 00:22:46 +0100
commitc8bf2e7d47c3b8f34cb79847edcd5dd50b8f280e (patch)
treecc22dc6c91f58ccaadd97fdd816159de6ec8a135 /spec/gitlab_config_spec.rb
parent764f6f47fa6a8698ae033532ae49875a87030518 (diff)
downloadgitlab-shell-c8bf2e7d47c3b8f34cb79847edcd5dd50b8f280e.tar.gz
Revert "Merge branch 'ash.mckenzie/srp-refactor' into 'master'"
This reverts commit 3aaf4751e09262c53544a1987f59b1308af9b6c1, reversing changes made to c6577e0d75f51b017f2f332838b97c3ca5b497c0.
Diffstat (limited to 'spec/gitlab_config_spec.rb')
-rw-r--r--spec/gitlab_config_spec.rb36
1 files changed, 5 insertions, 31 deletions
diff --git a/spec/gitlab_config_spec.rb b/spec/gitlab_config_spec.rb
index dd7e3bc..a1c52a0 100644
--- a/spec/gitlab_config_spec.rb
+++ b/spec/gitlab_config_spec.rb
@@ -3,55 +3,29 @@ require_relative '../lib/gitlab_config'
describe GitlabConfig do
let(:config) { GitlabConfig.new }
- let(:config_data) do
- {
- # 'user' => 'git',
- # 'http_settings' => {
- # 'self_signed_cert' => false
- # },
- # 'log_level' => 'ERROR',
- # 'audit_usernames' => true,
- # 'log_format' => 'json', # Not sure on other values?
- # 'git_trace_log_file' => nil
- }
- end
-
- before do
- expect(YAML).to receive(:load_file).and_return(config_data)
- end
- describe '#gitlab_url' do
+ describe :gitlab_url do
let(:url) { 'http://test.com' }
-
subject { config.gitlab_url }
-
- before { config_data['gitlab_url'] = url }
+ before { config.send(:config)['gitlab_url'] = url }
it { should_not be_empty }
it { should eq(url) }
context 'remove trailing slashes' do
- before { config_data['gitlab_url'] = url + '//' }
+ before { config.send(:config)['gitlab_url'] = url + '//' }
it { should eq(url) }
end
end
- describe '#audit_usernames' do
+ describe :audit_usernames do
subject { config.audit_usernames }
it("returns false by default") { should eq(false) }
end
- describe '#log_level' do
- subject { config.log_level }
-
- it 'returns "INFO" by default' do
- should eq('INFO')
- end
- end
-
- describe '#log_format' do
+ describe :log_format do
subject { config.log_format }
it 'returns "text" by default' do