Commit 7fd0f5fc authored by Gabriel Mazetto's avatar Gabriel Mazetto

Adding progressbar explicitly and spec extensions for it

parent 3016cf26
...@@ -174,6 +174,9 @@ gem 'httparty', '~> 0.13.3' ...@@ -174,6 +174,9 @@ gem 'httparty', '~> 0.13.3'
# Colored output to console # Colored output to console
gem 'rainbow', '~> 2.2' gem 'rainbow', '~> 2.2'
# Progress bar
gem 'ruby-progressbar'
# GitLab settings # GitLab settings
gem 'settingslogic', '~> 2.0.9' gem 'settingslogic', '~> 2.0.9'
......
...@@ -1165,6 +1165,7 @@ DEPENDENCIES ...@@ -1165,6 +1165,7 @@ DEPENDENCIES
rubocop-rspec (~> 1.22.1) rubocop-rspec (~> 1.22.1)
ruby-fogbugz (~> 0.2.1) ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.17.0) ruby-prof (~> 0.17.0)
ruby-progressbar
ruby_parser (~> 3.8) ruby_parser (~> 3.8)
rufus-scheduler (~> 3.4) rufus-scheduler (~> 3.4)
rugged (~> 0.27) rugged (~> 0.27)
......
...@@ -13,6 +13,10 @@ module RakeHelpers ...@@ -13,6 +13,10 @@ module RakeHelpers
allow(main_object).to receive(:print) allow(main_object).to receive(:print)
end end
def silence_progress_bar
allow_any_instance_of(ProgressBar::Output).to receive(:stream).and_return(double().as_null_object)
end
def main_object def main_object
@main_object ||= TOPLEVEL_BINDING.eval('self') @main_object ||= TOPLEVEL_BINDING.eval('self')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment