diff options
Diffstat (limited to 'qa/spec')
-rw-r--r-- | qa/spec/runtime/env_spec.rb | 55 | ||||
-rw-r--r-- | qa/spec/runtime/key/ecdsa_spec.rb | 2 | ||||
-rw-r--r-- | qa/spec/runtime/scenario_spec.rb | 27 | ||||
-rw-r--r-- | qa/spec/scenario/test/instance_spec.rb | 6 |
4 files changed, 4 insertions, 86 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb index 2b6365dbc41..a45103ab2d0 100644 --- a/qa/spec/runtime/env_spec.rb +++ b/qa/spec/runtime/env_spec.rb @@ -1,61 +1,6 @@ describe QA::Runtime::Env do include Support::StubENV - describe '.chrome_headless?' do - context 'when there is an env variable set' do - it 'returns false when falsey values specified' do - stub_env('CHROME_HEADLESS', 'false') - expect(described_class.chrome_headless?).to be_falsey - - stub_env('CHROME_HEADLESS', 'no') - expect(described_class.chrome_headless?).to be_falsey - - stub_env('CHROME_HEADLESS', '0') - expect(described_class.chrome_headless?).to be_falsey - end - - it 'returns true when anything else specified' do - stub_env('CHROME_HEADLESS', 'true') - expect(described_class.chrome_headless?).to be_truthy - - stub_env('CHROME_HEADLESS', '1') - expect(described_class.chrome_headless?).to be_truthy - - stub_env('CHROME_HEADLESS', 'anything') - expect(described_class.chrome_headless?).to be_truthy - end - end - - context 'when there is no env variable set' do - it 'returns the default, true' do - stub_env('CHROME_HEADLESS', nil) - expect(described_class.chrome_headless?).to be_truthy - end - end - end - - describe '.running_in_ci?' do - context 'when there is an env variable set' do - it 'returns true if CI' do - stub_env('CI', 'anything') - expect(described_class.running_in_ci?).to be_truthy - end - - it 'returns true if CI_SERVER' do - stub_env('CI_SERVER', 'anything') - expect(described_class.running_in_ci?).to be_truthy - end - end - - context 'when there is no env variable set' do - it 'returns true' do - stub_env('CI', nil) - stub_env('CI_SERVER', nil) - expect(described_class.running_in_ci?).to be_falsey - end - end - end - describe '.user_type' do it 'returns standard if not defined' do expect(described_class.user_type).to eq('standard') diff --git a/qa/spec/runtime/key/ecdsa_spec.rb b/qa/spec/runtime/key/ecdsa_spec.rb index e19ea7b8018..95a79ed59c9 100644 --- a/qa/spec/runtime/key/ecdsa_spec.rb +++ b/qa/spec/runtime/key/ecdsa_spec.rb @@ -12,7 +12,7 @@ describe QA::Runtime::Key::ECDSA do describe '#new' do it 'does not support arbitrary bits' do expect { described_class.new(123) } - .to raise_error(Gitlab::QA::Framework::Docker::Shellout::StatusError) + .to raise_error(Gitlab::QA::Framework::Utils::Shellout::StatusError) end end end diff --git a/qa/spec/runtime/scenario_spec.rb b/qa/spec/runtime/scenario_spec.rb deleted file mode 100644 index 7009192bcc0..00000000000 --- a/qa/spec/runtime/scenario_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -describe QA::Runtime::Scenario do - subject do - Module.new.extend(described_class) - end - - it 'makes it possible to define global scenario attributes' do - subject.define(:my_attribute, 'some-value') - subject.define(:another_attribute, 'another-value') - - expect(subject.my_attribute).to eq 'some-value' - expect(subject.another_attribute).to eq 'another-value' - expect(subject.attributes) - .to eq(my_attribute: 'some-value', another_attribute: 'another-value') - end - - it 'raises error when attribute is not known' do - expect { subject.invalid_accessor } - .to raise_error ArgumentError, /invalid_accessor/ - end - - it 'raises error when attribute is empty' do - subject.define(:empty_attribute, '') - - expect { subject.empty_attribute } - .to raise_error ArgumentError, /empty_attribute/ - end -end diff --git a/qa/spec/scenario/test/instance_spec.rb b/qa/spec/scenario/test/instance_spec.rb index 92d68f9f7d9..dd2e934582f 100644 --- a/qa/spec/scenario/test/instance_spec.rb +++ b/qa/spec/scenario/test/instance_spec.rb @@ -8,12 +8,12 @@ describe QA::Scenario::Test::Instance do context '#perform' do let(:arguments) { spy('Runtime::Scenario') } let(:release) { spy('Runtime::Release') } - let(:runner) { spy('Specs::Runner') } + let(:runner) { spy('Scenario::Runner') } before do stub_const('QA::Runtime::Release', release) - stub_const('QA::Runtime::Scenario', arguments) - stub_const('QA::Specs::Runner', runner) + stub_const('Gitlab::QA::Framework::Runtime::Scenario', arguments) + stub_const('Gitlab::QA::Framework::Scenario::Runner', runner) allow(runner).to receive(:perform).and_yield(runner) end |