rspec-system 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,18 @@
1
+ 1.6.0
2
+ =====
3
+
4
+ This minor feature release now adds test counts to the rspec-system formatter, for example:
5
+
6
+ Running test: 21 of 22
7
+
8
+ So you can see mid-flight where the testing is up to.
9
+
10
+ #### Detailed Changes
11
+
12
+ * Present test count in formatter (Ken Barber)
13
+
14
+ -------------------------------
15
+
1
16
  1.5.0
2
17
  =====
3
18
 
@@ -22,6 +22,7 @@ module RSpecSystem
22
22
  # @param count [Fixnum] number of tests to run
23
23
  # @return [void]
24
24
  def start(count)
25
+ @max_tests = count
25
26
  super(count)
26
27
  output << "=================================================================\n\n"
27
28
  output << bold("Commencing rspec-system tests\n")
@@ -35,7 +36,8 @@ module RSpecSystem
35
36
  def example_started(example)
36
37
  super(example)
37
38
  output << "=================================================================\n\n"
38
- output << bold("Running test:\n ") << color(example.full_description, :magenta) << "\n\n"
39
+ output << bold("Running test: ") << "#{next_index} of #{@max_tests}" << "\n"
40
+ output << bold("Description:\n ") << color(example.full_description, :magenta) << "\n\n"
39
41
  end
40
42
 
41
43
  # Display output when an example has passed
@@ -66,7 +68,6 @@ module RSpecSystem
66
68
  super(example)
67
69
  msg = example.execution_result[:exception]
68
70
  output << "\n" << bold('Result: ') << failure_color('failed') << "\n"
69
- output << bold("Index: ") << "#{next_failure_index}\n"
70
71
  output << bold("Reason:\n") << "#{msg}\n\n"
71
72
  end
72
73
 
@@ -74,9 +75,9 @@ module RSpecSystem
74
75
  #
75
76
  # @api private
76
77
  # @return [Fixnum] index #
77
- def next_failure_index
78
- @next_failure_index ||= 0
79
- @next_failure_index += 1
78
+ def next_index
79
+ @next_index ||= 0
80
+ @next_index += 1
80
81
  end
81
82
  end
82
83
  end
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # Metadata
4
4
  s.name = "rspec-system"
5
- s.version = "1.5.0"
5
+ s.version = "1.6.0"
6
6
  s.authors = ["Ken Barber"]
7
7
  s.email = ["ken@bob.sh"]
8
8
  s.homepage = "https://github.com/puppetlabs/rspec-system"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-30 00:00:00.000000000 Z
12
+ date: 2013-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec