Class: RspecSpinner::Spinner
- Inherits:
-
RspecSpinnerBase
- Object
- Spec::Runner::Formatter::BaseTextFormatter
- RspecSpinnerBase
- RspecSpinner::Spinner
- Defined in:
- lib/rspec_spinner/spinner.rb
Constant Summary
Constants inherited from RspecSpinnerBase
RspecSpinnerBase::ERROR_STATE_COLORS, RspecSpinnerBase::THRESHOLD
Instance Attribute Summary
Attributes inherited from RspecSpinnerBase
Instance Method Summary collapse
Methods inherited from RspecSpinnerBase
#dump_failure, #erase_current_line, #example_failed, #example_passed, #example_pending, #immediately_dump_failure, #immediately_dump_pending, #increment, #mark_error_state_failed, #mark_error_state_pending, #method_missing, #print_warning_if_slow, #start_dump, #with_color
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RspecSpinner::RspecSpinnerBase
Instance Method Details
#example_started(example) ⇒ Object
13 14 15 16 17 |
# File 'lib/rspec_spinner/spinner.rb', line 13 def example_started(example) desc = example.description.gsub(/\r|\n/, "") .subject = desc super end |
#start(example_count) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/rspec_spinner/spinner.rb', line 4 def start(example_count) @current = 0 @total = example_count @error_state = :all_passing = Rtui::Progress.new("#{example_count} examples", example_count, {:out => output, :components => [:percentage, :spinner, :subject, :stat]}) .subject = "Starting..." end |