summaryrefslogtreecommitdiff
path: root/spec/models/application_setting_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-25 19:09:00 +0200
committerRémy Coutable <remy@rymai.me>2017-07-27 14:31:53 +0200
commitcddc5cacfb833fbd188d2f5982381f66dd3eee3b (patch)
treede3e7bda37c8b7f0eb5586695d6d871484dc44e2 /spec/models/application_setting_spec.rb
parentddccd24c1388dadc057ac3c4c0a49f3fea847292 (diff)
downloadgitlab-ce-cddc5cacfb833fbd188d2f5982381f66dd3eee3b.tar.gz
Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r--spec/models/application_setting_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb
index 41129b945b6..359753b600e 100644
--- a/spec/models/application_setting_spec.rb
+++ b/spec/models/application_setting_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe ApplicationSetting do
- let(:setting) { ApplicationSetting.create_from_defaults }
+ let(:setting) { described_class.create_from_defaults }
it { expect(setting).to be_valid }
it { expect(setting.uuid).to be_present }
@@ -159,10 +159,10 @@ describe ApplicationSetting do
context 'redis unavailable' do
it 'returns an ApplicationSetting' do
allow(Rails.cache).to receive(:fetch).and_call_original
- allow(ApplicationSetting).to receive(:last).and_return(:last)
+ allow(described_class).to receive(:last).and_return(:last)
expect(Rails.cache).to receive(:fetch).with(ApplicationSetting::CACHE_KEY).and_raise(ArgumentError)
- expect(ApplicationSetting.current).to eq(:last)
+ expect(described_class.current).to eq(:last)
end
end
end