parallel_formatter 0.0.1 → 0.0.2

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: 909890275a2bf8ca476c3814f54c74ef8dfe16c1
4
- data.tar.gz: 7874f7dc97c0820c94869a86b2280f7431a9decb
3
+ metadata.gz: 7b7cf01a1d5143efcb0a115f39e2d1ad942e41e9
4
+ data.tar.gz: f74933aaa5dd140ce2b9a1197138b447b4a8c1d5
5
5
  SHA512:
6
- metadata.gz: 2e97d369a4c2360ccf16f477e8d3810ad3f905faef1563a846ce429ec65d895064e1e6fa6185fba43ee5f4b27705c26c7a474ac406c410d606953b3b27abe2d2
7
- data.tar.gz: 849744e494d4f42d56d4e49ccf6da9b563535218123ab8df90ab18402f6c46f50ed9ede9f97b176ef1b893ab54a90fdce22d0603ab86d7ee192636afc22e706f
6
+ metadata.gz: 6f60ebbeaab3b1c47d41e70f4b11ebf0662ee5965421f7e389a8524cd29dca8d736c6b5af2f14616bf17cd16d06b3459d824ea92674e529f1b680fe0503647a6
7
+ data.tar.gz: 238c725c44843bfdc8d331ce6e2bc664c50c048678555a4a7286ed9f86fda5d88fd0bf738204ef51f6b86bc58b4287ade905f979b9ad003cb316248b1624f11f
@@ -1,3 +1,3 @@
1
1
  module ParallelFormatter
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,74 +1,72 @@
1
1
  require "parallel_formatter/version"
2
2
  require 'rspec/core/formatters/base_text_formatter'
3
3
 
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
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
9
8
 
10
- def initialize(output)
11
- super
12
- @failed_examples = []
13
- end
9
+ def initialize(output)
10
+ super
11
+ @failed_examples = []
12
+ end
14
13
 
15
- def example_group_started(notification)
16
- output.puts "GROUP STARTED: #{notification.group.description.strip}"
17
- end
14
+ def example_group_started(notification)
15
+ output.puts "GROUP STARTED: #{notification.group.description.strip}"
16
+ end
18
17
 
19
- def example_started(notification)
20
- output.puts "TEST STARTED: #{notification.example.location}: " \
21
- "#{notification.example.description}"
22
- end
18
+ def example_started(notification)
19
+ output.puts "TEST STARTED: #{notification.example.location}: " \
20
+ "#{notification.example.description}"
21
+ end
23
22
 
24
- def example_passed(passed)
25
- output.puts passed_output(passed.example)
26
- end
23
+ def example_passed(passed)
24
+ output.puts passed_output(passed.example)
25
+ end
27
26
 
28
- def example_pending(pending)
29
- output.puts pending_output(pending.example,
30
- pending.example.execution_result.pending_message)
31
- end
27
+ def example_pending(pending)
28
+ output.puts pending_output(pending.example,
29
+ pending.example.execution_result.pending_message)
30
+ end
32
31
 
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
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
39
38
 
40
- private
39
+ private
41
40
 
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
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
50
49
 
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
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
59
58
 
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
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
68
67
 
69
- def next_failure_index
70
- @next_failure_index ||= 0
71
- @next_failure_index += 1
72
- end
68
+ def next_failure_index
69
+ @next_failure_index ||= 0
70
+ @next_failure_index += 1
73
71
  end
74
72
  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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Guanzon