Class: RspecProgressBar::Formatter

Inherits:
RSpec::Core::Formatters::BaseTextFormatter
  • Object
show all
Defined in:
lib/rspec_progress_bar/formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#progress_barObject

Returns the value of attribute progress_bar.



9
10
11
# File 'lib/rspec_progress_bar/formatter.rb', line 9

def progress_bar
  @progress_bar
end

Instance Method Details

#example_started(_notification) ⇒ Object



15
16
17
18
# File 'lib/rspec_progress_bar/formatter.rb', line 15

def example_started(_notification)
  progress_bar.count += 1
  output << "\r#{progress_bar}"
end

#start(notification) ⇒ Object



11
12
13
# File 'lib/rspec_progress_bar/formatter.rb', line 11

def start(notification)
  @progress_bar = ProgressBar.new(notification.count)
end