gitlab-org--gitlab-foss/spec/support/helpers/rake_helpers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
514 B
Ruby
Raw Normal View History

# frozen_string_literal: true
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
2017-05-25 19:46:54 -04:00
def silence_progress_bar
allow_any_instance_of(ProgressBar::Output).to receive(:stream).and_return(double.as_null_object)
end
def main_object
@main_object ||= TOPLEVEL_BINDING.eval('self')
2017-05-25 19:46:54 -04:00
end
end