lib/fuubar.rb in fuubar-2.3.1 vs lib/fuubar.rb in fuubar-2.3.2
- old
+ new
@@ -29,37 +29,37 @@
def initialize(*args)
super
self.example_tick_lock = Mutex.new
self.progress = ProgressBar.create(
- DEFAULT_PROGRESS_BAR_OPTIONS
- .merge(:throttle_rate => continuous_integration? ? 1.0 : nil)
- .merge(:total => 0,
- :output => output,
- :autostart => false)
+ DEFAULT_PROGRESS_BAR_OPTIONS.
+ merge(:throttle_rate => continuous_integration? ? 1.0 : nil).
+ merge(:total => 0,
+ :output => output,
+ :autostart => false)
)
end
def start(notification)
- progress_bar_options = DEFAULT_PROGRESS_BAR_OPTIONS
- .merge(:throttle_rate => continuous_integration? ? 1.0 : nil)
- .merge(configuration.fuubar_progress_bar_options)
- .merge(:total => notification.count,
- :output => output,
- :autostart => false)
+ progress_bar_options = DEFAULT_PROGRESS_BAR_OPTIONS.
+ merge(:throttle_rate => continuous_integration? ? 1.0 : nil).
+ merge(configuration.fuubar_progress_bar_options).
+ merge(:total => notification.count,
+ :output => output,
+ :autostart => false)
self.progress = ProgressBar.create(progress_bar_options)
self.passed_count = 0
self.pending_count = 0
self.failed_count = 0
self.example_tick_thread = start_tick_thread(notification)
if Object.const_defined?('Pry')
- Pry
- .config
- .hooks
- .add_hook(:when_started, :fuubar_kill_refresh) do |_target, _opt, _|
+ Pry.
+ config.
+ hooks.
+ add_hook(:when_started, :fuubar_kill_refresh) do |_target, _opt, _|
example_tick_thread.kill
end
end
super
@@ -113,12 +113,14 @@
# We output each failure as it happens so we don't need to output them en
# masse at the end of the run.
#
end
+ # rubocop:disable Naming/MemoizedInstanceVariableName
def output
@fuubar_output ||= Fuubar::Output.new(super, configuration.tty?)
end
+ # rubocop:enable Naming/MemoizedInstanceVariableName
private
def increment
with_current_color { progress.increment }