Fix GitLab QA release inflector strategy

This commit is contained in:
Grzegorz Bizon 2017-03-09 15:04:05 +01:00
parent 8a418f3e48
commit 175a3dfda0
2 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module QA
end
begin
require "#{version.downcase}/strategy"
require "qa/#{version.downcase}/strategy"
rescue LoadError
# noop
end

View File

@ -5,6 +5,7 @@ describe QA::Runtime::Release do
before do
stub_const('QA::CE::Strategy', strategy)
stub_const('QA::EE::Strategy', strategy)
end
describe '#has_strategy?' do
@ -32,6 +33,11 @@ describe QA::Runtime::Release do
context 'when release version does not have extension strategy' do
subject { described_class.new('CE') }
before do
hide_const('QA::CE::Strategy')
hide_const('QA::EE::Strategy')
end
describe '#has_strategy?' do
it 'returns false' do
expect(subject.has_strategy?).to be false