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:
Diffstat (limited to 'qa/spec/specs/runner_spec.rb')
-rw-r--r--qa/spec/specs/runner_spec.rb49
1 files changed, 49 insertions, 0 deletions
diff --git a/qa/spec/specs/runner_spec.rb b/qa/spec/specs/runner_spec.rb
new file mode 100644
index 00000000000..b237b954889
--- /dev/null
+++ b/qa/spec/specs/runner_spec.rb
@@ -0,0 +1,49 @@
+# frozen_string_literal: true
+
+describe QA::Specs::Runner do
+ context '#perform' do
+ before do
+ allow(QA::Runtime::Browser).to receive(:configure!)
+ end
+
+ it 'excludes the orchestrated tag by default' do
+ expect(RSpec::Core::Runner).to receive(:run)
+ .with(['--tag', '~orchestrated', File.expand_path('../../qa/specs/features', __dir__)], $stderr, $stdout)
+ .and_return(0)
+
+ subject.perform
+ end
+
+ context 'when tty is set' do
+ subject do
+ described_class.new.tap do |runner|
+ runner.tty = true
+ end
+ end
+
+ it 'sets the `--tty` flag' do
+ expect(RSpec::Core::Runner).to receive(:run)
+ .with(['--tty', '--tag', '~orchestrated', File.expand_path('../../qa/specs/features', __dir__)], $stderr, $stdout)
+ .and_return(0)
+
+ subject.perform
+ end
+ end
+
+ context 'when tags are set' do
+ subject do
+ described_class.new.tap do |runner|
+ runner.tags = %i[orchestrated github]
+ end
+ end
+
+ it 'focuses on the given tags' do
+ expect(RSpec::Core::Runner).to receive(:run)
+ .with(['--tag', 'orchestrated', '--tag', 'github', File.expand_path('../../qa/specs/features', __dir__)], $stderr, $stdout)
+ .and_return(0)
+
+ subject.perform
+ end
+ end
+ end
+end