Module: RSpec::Bisect::Reporters::Reporter
- Included in:
- ConsoleReporter
- Defined in:
- lib/rspec/bisect/reporters/reporter.rb
Instance Method Summary collapse
- #culprits(culprits, example) ⇒ Object
- #determining_culprits(example) ⇒ Object
- #failing_tests(failure_count) ⇒ Object
- #order_dependent_examples(examples) ⇒ Object
- #seed(seed) ⇒ Object
Instance Method Details
#culprits(culprits, example) ⇒ Object
37 38 39 40 41 |
# File 'lib/rspec/bisect/reporters/reporter.rb', line 37 def culprits(culprits, example) culprits.each { |culprit| puts culprit['full_description'].green } report_failure example['full_description'] end |
#determining_culprits(example) ⇒ Object
32 33 34 35 |
# File 'lib/rspec/bisect/reporters/reporter.rb', line 32 def determining_culprits(example) report '' report "Culprits for #{example['full_description']}:" end |
#failing_tests(failure_count) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rspec/bisect/reporters/reporter.rb', line 13 def failing_tests(failure_count) if failure_count > 0 report_failure "#{failure_count} failing test#{failure_count > 1 ? 's' : ''}.".red else report_success 'No failing tests.' end end |
#order_dependent_examples(examples) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rspec/bisect/reporters/reporter.rb', line 21 def order_dependent_examples(examples) if examples.size > 0 report "Order dependenc#{ examples.size > 1 ? 'ies' : 'y'} detected:" examples.each do |example| report_failure "\t#{example['full_description']}" end else report_success 'No order dependencies.' end end |
#seed(seed) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/rspec/bisect/reporters/reporter.rb', line 5 def seed(seed) if seed.nil? report 'Running tests with no seed' else report "Running tests with seed #{seed}" end end |