Class: ChemistryKit::RSpec::JUnitFormatter
- Inherits:
-
RSpec::Core::Formatters::BaseFormatter
- Object
- RSpec::Core::Formatters::BaseFormatter
- ChemistryKit::RSpec::JUnitFormatter
- Defined in:
- lib/chemistrykit/rspec/j_unit_formatter.rb
Instance Method Summary collapse
- #dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object
- #example_failed(example) ⇒ Object
- #example_passed(example) ⇒ Object
- #example_pending(example) ⇒ Object
-
#initialize(output) ⇒ JUnitFormatter
constructor
rspec formatter methods we care about.
Constructor Details
#initialize(output) ⇒ JUnitFormatter
rspec formatter methods we care about
15 16 17 18 19 |
# File 'lib/chemistrykit/rspec/j_unit_formatter.rb', line 15 def initialize(output) super output @test_suite_results = {} @builder = Builder::XmlMarkup.new indent: 2 end |
Instance Method Details
#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object
33 34 35 36 |
# File 'lib/chemistrykit/rspec/j_unit_formatter.rb', line 33 def dump_summary(duration, example_count, failure_count, pending_count) build_results duration, example_count, failure_count, pending_count output.puts @builder.target! end |
#example_failed(example) ⇒ Object
25 26 27 |
# File 'lib/chemistrykit/rspec/j_unit_formatter.rb', line 25 def example_failed(example) add_to_test_suite_results example end |
#example_passed(example) ⇒ Object
21 22 23 |
# File 'lib/chemistrykit/rspec/j_unit_formatter.rb', line 21 def example_passed(example) add_to_test_suite_results example end |
#example_pending(example) ⇒ Object
29 30 31 |
# File 'lib/chemistrykit/rspec/j_unit_formatter.rb', line 29 def example_pending(example) add_to_test_suite_results example end |