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/qa/specs/helpers/rspec.rb')
-rw-r--r--qa/qa/specs/helpers/rspec.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/qa/qa/specs/helpers/rspec.rb b/qa/qa/specs/helpers/rspec.rb
index 853dfbfd1b6..3e97dbd118a 100644
--- a/qa/qa/specs/helpers/rspec.rb
+++ b/qa/qa/specs/helpers/rspec.rb
@@ -19,13 +19,22 @@ module QA
# expanding into the global state
# See: https://github.com/rspec/rspec-core/issues/2603
def describe_successfully(*args, &describe_body)
- reporter = ::RSpec.configuration.reporter
-
- example_group = RSpec.describe(*args, &describe_body)
+ example_group = ::RSpec.describe(*args, &describe_body)
ran_successfully = example_group.run reporter
expect(ran_successfully).to eq true
example_group
end
+
+ def send_stop_notification
+ reporter.notify(
+ :stop,
+ ::RSpec::Core::Notifications::ExamplesNotification.new(reporter)
+ )
+ end
+
+ def reporter
+ ::RSpec.configuration.reporter
+ end
end
end
end