From cc06bb2c6ec1facf2b1eb50803dbedc076abe017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 17 Dec 2018 15:10:45 +0100 Subject: Simplify spec/lib/gitlab/current_settings_spec.rb a bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- spec/lib/gitlab/current_settings_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/lib/gitlab') diff --git a/spec/lib/gitlab/current_settings_spec.rb b/spec/lib/gitlab/current_settings_spec.rb index add8867d243..caf9fc5442c 100644 --- a/spec/lib/gitlab/current_settings_spec.rb +++ b/spec/lib/gitlab/current_settings_spec.rb @@ -113,6 +113,8 @@ describe Gitlab::CurrentSettings do end shared_examples 'a non-persisted ApplicationSetting object' do + let(:current_settings) { described_class.current_application_settings } + it 'returns a non-persisted ApplicationSetting object' do expect(current_settings).to be_a(ApplicationSetting) expect(current_settings).not_to be_persisted @@ -132,9 +134,7 @@ describe Gitlab::CurrentSettings do end context 'with no ApplicationSetting DB record' do - it_behaves_like 'a non-persisted ApplicationSetting object' do - let(:current_settings) { described_class.current_application_settings } - end + it_behaves_like 'a non-persisted ApplicationSetting object' end context 'with an existing ApplicationSetting DB record' do -- cgit v1.2.3