Improve QA test scenario entrypoint specs
This commit is contained in:
parent
6dc5dab7d7
commit
3abae1a78d
1 changed files with 7 additions and 7 deletions
|
@ -6,23 +6,23 @@ describe QA::Scenario::Entrypoint do
|
|||
end
|
||||
|
||||
context '#perform' do
|
||||
let(:config) { spy('Specs::Config') }
|
||||
let(:arguments) { spy('Runtime::Scenario') }
|
||||
let(:release) { spy('Runtime::Release') }
|
||||
let(:runner) { spy('Specs::Runner') }
|
||||
|
||||
before do
|
||||
allow(config).to receive(:perform) { |&block| block.call config }
|
||||
allow(runner).to receive(:perform) { |&block| block.call runner }
|
||||
|
||||
stub_const('QA::Specs::Config', config)
|
||||
stub_const('QA::Runtime::Release', release)
|
||||
stub_const('QA::Runtime::Scenario', arguments)
|
||||
stub_const('QA::Specs::Runner', runner)
|
||||
|
||||
allow(runner).to receive(:perform).and_yield(runner)
|
||||
end
|
||||
|
||||
it 'should set address' do
|
||||
it 'sets an address of the subject' do
|
||||
subject.perform("hello")
|
||||
|
||||
expect(config).to have_received(:address=).with("hello")
|
||||
expect(arguments).to have_received(:define)
|
||||
.with(:gitlab_address, "hello")
|
||||
end
|
||||
|
||||
context 'no paths' do
|
||||
|
|
Loading…
Reference in a new issue