2016-08-03 00:46:43 -04:00
|
|
|
module RakeHelpers
|
2016-11-29 13:21:25 -05:00
|
|
|
def run_rake_task(task_name, *args)
|
2016-08-03 00:46:43 -04:00
|
|
|
Rake::Task[task_name].reenable
|
2016-11-29 13:21:25 -05:00
|
|
|
Rake.application.invoke_task("#{task_name}[#{args.join(',')}]")
|
2016-08-03 00:46:43 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def stub_warn_user_is_not_gitlab
|
|
|
|
allow_any_instance_of(Object).to receive(:warn_user_is_not_gitlab)
|
|
|
|
end
|
2017-05-25 19:46:54 -04:00
|
|
|
|
|
|
|
def silence_output
|
|
|
|
allow($stdout).to receive(:puts)
|
|
|
|
allow($stdout).to receive(:print)
|
|
|
|
end
|
2016-08-03 00:46:43 -04:00
|
|
|
end
|