Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 12:16:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 12:16:11 +0300
commitedaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch)
tree11f143effbfeba52329fb7afbd05e6e2a3790241 /qa/spec/specs
parentd8a5691316400a0f7ec4f83832698f1988eb27c1 (diff)
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'qa/spec/specs')
-rw-r--r--qa/spec/specs/runner_spec.rb26
1 files changed, 23 insertions, 3 deletions
diff --git a/qa/spec/specs/runner_spec.rb b/qa/spec/specs/runner_spec.rb
index 021ce9091e0..5cc9ff403cd 100644
--- a/qa/spec/specs/runner_spec.rb
+++ b/qa/spec/specs/runner_spec.rb
@@ -28,6 +28,26 @@ RSpec.describe QA::Specs::Runner do
end
end
+ context 'when count_examples_only is set as an option' do
+ let(:out) { StringIO.new }
+
+ before do
+ QA::Runtime::Scenario.define(:count_examples_only, true)
+ out.string = '22 examples,'
+ allow(StringIO).to receive(:new).and_return(out)
+ end
+
+ it 'sets the `--dry-run` flag' do
+ expect_rspec_runner_arguments(['--dry-run', '--tag', '~orchestrated', '--tag', '~transient', '--tag', '~geo', *described_class::DEFAULT_TEST_PATH_ARGS], [$stderr, anything])
+
+ subject.perform
+ end
+
+ after do
+ QA::Runtime::Scenario.attributes.delete(:count_examples_only)
+ end
+ end
+
context 'when tags are set' do
subject { described_class.new.tap { |runner| runner.tags = %i[orchestrated github] } }
@@ -158,10 +178,10 @@ RSpec.describe QA::Specs::Runner do
end
end
- def expect_rspec_runner_arguments(arguments)
+ def expect_rspec_runner_arguments(arguments, std_arguments = described_class::DEFAULT_STD_ARGS)
expect(RSpec::Core::Runner).to receive(:run)
- .with(arguments, $stderr, $stdout)
- .and_return(0)
+ .with(arguments, *std_arguments)
+ .and_return(0)
end
end
end