parallel_formatter 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b7cf01a1d5143efcb0a115f39e2d1ad942e41e9
4
- data.tar.gz: f74933aaa5dd140ce2b9a1197138b447b4a8c1d5
3
+ metadata.gz: f70c1ede8f919f578f1d7eea03ac7acb6c7c65d8
4
+ data.tar.gz: e9cd32d1d8b65b16c06aea8fdccfd8ecb572ee03
5
5
  SHA512:
6
- metadata.gz: 6f60ebbeaab3b1c47d41e70f4b11ebf0662ee5965421f7e389a8524cd29dca8d736c6b5af2f14616bf17cd16d06b3459d824ea92674e529f1b680fe0503647a6
7
- data.tar.gz: 238c725c44843bfdc8d331ce6e2bc664c50c048678555a4a7286ed9f86fda5d88fd0bf738204ef51f6b86bc58b4287ade905f979b9ad003cb316248b1624f11f
6
+ metadata.gz: 2b8528a765d47d4f150d226815a0261084cae3cb1a8bfb99979bdaa9bb4830d01a21ca769653d8572bdc3bfb3009c88afea027b4fb81c1a2b0be8fb5974fa01d
7
+ data.tar.gz: 975f6226586e02ad8f0871d28ac0c1a23f88697317d71498d50cf7f918c6a5c313aaf5e9541bb14a343a9c670f6b4c9f066d97bb45ae0ee2667757739e10a80c
@@ -1,3 +1,3 @@
1
1
  module ParallelFormatter
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,72 +1,74 @@
1
1
  require "parallel_formatter/version"
2
2
  require 'rspec/core/formatters/base_text_formatter'
3
3
 
4
- class ParallelFormatter < RSpec::Core::Formatters::BaseTextFormatter
5
- RSpec::Core::Formatters.register self, :example_group_started, :example_started,
6
- :example_passed, :example_pending,
7
- :example_failed
4
+ module ParallelFormatter
5
+ class ParallelFormatter < RSpec::Core::Formatters::BaseTextFormatter
6
+ RSpec::Core::Formatters.register self, :example_group_started, :example_started,
7
+ :example_passed, :example_pending,
8
+ :example_failed
8
9
 
9
- def initialize(output)
10
- super
11
- @failed_examples = []
12
- end
10
+ def initialize(output)
11
+ super
12
+ @failed_examples = []
13
+ end
13
14
 
14
- def example_group_started(notification)
15
- output.puts "GROUP STARTED: #{notification.group.description.strip}"
16
- end
15
+ def example_group_started(notification)
16
+ output.puts "GROUP STARTED: #{notification.group.description.strip}"
17
+ end
17
18
 
18
- def example_started(notification)
19
- output.puts "TEST STARTED: #{notification.example.location}: " \
20
- "#{notification.example.description}"
21
- end
19
+ def example_started(notification)
20
+ output.puts "TEST STARTED: #{notification.example.location}: " \
21
+ "#{notification.example.description}"
22
+ end
22
23
 
23
- def example_passed(passed)
24
- output.puts passed_output(passed.example)
25
- end
24
+ def example_passed(passed)
25
+ output.puts passed_output(passed.example)
26
+ end
26
27
 
27
- def example_pending(pending)
28
- output.puts pending_output(pending.example,
29
- pending.example.execution_result.pending_message)
30
- end
28
+ def example_pending(pending)
29
+ output.puts pending_output(pending.example,
30
+ pending.example.execution_result.pending_message)
31
+ end
31
32
 
32
- def example_failed(failure)
33
- @failed_examples << failure.example
34
- output.puts failure_output(failure.example,
35
- failure.example.execution_result.exception)
36
- output.puts failure.fully_formatted(@failed_examples.size)
37
- end
33
+ def example_failed(failure)
34
+ @failed_examples << failure.example
35
+ output.puts failure_output(failure.example,
36
+ failure.example.execution_result.exception)
37
+ output.puts failure.fully_formatted(@failed_examples.size)
38
+ end
38
39
 
39
- private
40
+ private
40
41
 
41
- def passed_output(example)
42
- RSpec::Core::Formatters::ConsoleCodes.wrap(
43
- 'TEST PASSED: ' \
44
- "#{example.location}: " \
45
- " #{example.description.strip}",
46
- :success
47
- )
48
- end
42
+ def passed_output(example)
43
+ RSpec::Core::Formatters::ConsoleCodes.wrap(
44
+ 'TEST PASSED: ' \
45
+ "#{example.location}: " \
46
+ " #{example.description.strip}",
47
+ :success
48
+ )
49
+ end
49
50
 
50
- def pending_output(example, message)
51
- RSpec::Core::Formatters::ConsoleCodes.wrap(
52
- 'TEST PENDING: ' \
53
- "#{example.location}: " \
54
- "#{example.description.strip} (PENDING: #{message})",
55
- :pending
56
- )
57
- end
51
+ def pending_output(example, message)
52
+ RSpec::Core::Formatters::ConsoleCodes.wrap(
53
+ 'TEST PENDING: ' \
54
+ "#{example.location}: " \
55
+ "#{example.description.strip} (PENDING: #{message})",
56
+ :pending
57
+ )
58
+ end
58
59
 
59
- def failure_output(example, _exception)
60
- RSpec::Core::Formatters::ConsoleCodes.wrap(
61
- 'TEST FAILED: ' \
62
- "#{example.location}: " \
63
- "#{example.description.strip} (FAILED - #{next_failure_index})",
64
- :failure
65
- )
66
- end
60
+ def failure_output(example, _exception)
61
+ RSpec::Core::Formatters::ConsoleCodes.wrap(
62
+ 'TEST FAILED: ' \
63
+ "#{example.location}: " \
64
+ "#{example.description.strip} (FAILED - #{next_failure_index})",
65
+ :failure
66
+ )
67
+ end
67
68
 
68
- def next_failure_index
69
- @next_failure_index ||= 0
70
- @next_failure_index += 1
69
+ def next_failure_index
70
+ @next_failure_index ||= 0
71
+ @next_failure_index += 1
72
+ end
71
73
  end
72
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Guanzon