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 'spec/support/helpers/rake_helpers.rb')
-rw-r--r--spec/support/helpers/rake_helpers.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/support/helpers/rake_helpers.rb b/spec/support/helpers/rake_helpers.rb
new file mode 100644
index 00000000000..86bfeed107c
--- /dev/null
+++ b/spec/support/helpers/rake_helpers.rb
@@ -0,0 +1,19 @@
+module RakeHelpers
+ def run_rake_task(task_name, *args)
+ Rake::Task[task_name].reenable
+ Rake.application.invoke_task("#{task_name}[#{args.join(',')}]")
+ end
+
+ def stub_warn_user_is_not_gitlab
+ allow(main_object).to receive(:warn_user_is_not_gitlab)
+ end
+
+ def silence_output
+ allow(main_object).to receive(:puts)
+ allow(main_object).to receive(:print)
+ end
+
+ def main_object
+ @main_object ||= TOPLEVEL_BINDING.eval('self')
+ end
+end