yardstick 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,7 +95,7 @@ module Yardstick
95
95
  #
96
96
  # @api private
97
97
  def coverage_text
98
- 'Coverage: %.1f%%' % (coverage * 100)
98
+ 'YARD-Coverage: %.1f%%' % (coverage * 100)
99
99
  end
100
100
 
101
101
  # The text for the successful measurements to include in the summary
@@ -85,7 +85,7 @@ module Yardstick
85
85
  #
86
86
  # @api public
87
87
  def verify_measurements
88
- puts "Coverage: #{total_coverage}% (threshold: #{@threshold}%)" if verbose
88
+ puts "YARD-Coverage: #{total_coverage}% (threshold: #{@threshold}%)" if verbose
89
89
  assert_meets_threshold
90
90
  assert_matches_threshold
91
91
  end
@@ -140,7 +140,7 @@ module Yardstick
140
140
  def assert_meets_threshold
141
141
  total_coverage = self.total_coverage
142
142
  if total_coverage < @threshold
143
- raise "Coverage must be at least #{@threshold}% but was #{total_coverage}%"
143
+ raise "YARD-Coverage must be at least #{@threshold}% but was #{total_coverage}%"
144
144
  end
145
145
  end
146
146
 
@@ -155,7 +155,7 @@ module Yardstick
155
155
  def assert_matches_threshold
156
156
  total_coverage = self.total_coverage
157
157
  if @require_exact_threshold && total_coverage > @threshold
158
- raise "Coverage has increased above the threshold of #{@threshold}% to #{total_coverage}%. You should update your threshold value."
158
+ raise "YARD-Coverage has increased above the threshold of #{@threshold}% to #{total_coverage}%. You should update your threshold value."
159
159
  end
160
160
  end
161
161
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Yardstick
4
- VERSION = '0.9.4'
4
+ VERSION = '0.9.5'
5
5
  end # module Yardstick
@@ -21,7 +21,7 @@ end
21
21
 
22
22
  shared_examples_for 'displays coverage summary' do
23
23
  it 'should output the coverage summary' do
24
- @output.should == "\nCoverage: 100.0% Success: 20 Failed: 0 Total: 20\n"
24
+ @output.should == "\nYARD-Coverage: 100.0% Success: 20 Failed: 0 Total: 20\n"
25
25
  end
26
26
  end
27
27
 
@@ -245,7 +245,7 @@ describe Yardstick::MeasurementSet do
245
245
 
246
246
  it 'should output the summary' do
247
247
  @output.should == "(stdin):1: #test: test measurement\n" \
248
- "\nCoverage: 0.0% Success: 0 Failed: 1 Total: 1\n"
248
+ "\nYARD-Coverage: 0.0% Success: 0 Failed: 1 Total: 1\n"
249
249
  end
250
250
  end
251
251
 
@@ -259,7 +259,7 @@ describe Yardstick::MeasurementSet do
259
259
 
260
260
  it 'should output the summary' do
261
261
  @output.should == "(stdin):1: #test: test measurement\n" \
262
- "\nCoverage: 0.0% Success: 0 Failed: 1 Total: 1\n"
262
+ "\nYARD-Coverage: 0.0% Success: 0 Failed: 1 Total: 1\n"
263
263
  end
264
264
  end
265
265
  end
@@ -27,7 +27,7 @@ shared_examples_for 'report writer' do
27
27
  it 'should write the report' do
28
28
  @task.path = 'lib/yardstick.rb' # speed up execution
29
29
  execute_action
30
- @output.read.should == "\nCoverage: 100.0% Success: 20 Failed: 0 Total: 20\n"
30
+ @output.read.should == "\nYARD-Coverage: 100.0% Success: 20 Failed: 0 Total: 20\n"
31
31
  end
32
32
  end
33
33
 
@@ -60,7 +60,7 @@ describe Yardstick::Rake::Verify do
60
60
 
61
61
  capture_stdout { Rake::Task['verify_measurements'].execute }
62
62
 
63
- @output.should == "Coverage: 100.0% (threshold: 100%)\n"
63
+ @output.should == "YARD-Coverage: 100.0% (threshold: 100%)\n"
64
64
  end
65
65
  end
66
66
 
@@ -96,7 +96,7 @@ describe Yardstick::Rake::Verify do
96
96
 
97
97
  capture_stdout { Rake::Task['custom_task_name'].execute }
98
98
 
99
- @output.should == "Coverage: 100.0% (threshold: 100%)\n"
99
+ @output.should == "YARD-Coverage: 100.0% (threshold: 100%)\n"
100
100
  end
101
101
  end
102
102
 
@@ -184,7 +184,7 @@ describe Yardstick::Rake::Verify do
184
184
  end
185
185
 
186
186
  it 'should output coverage summary' do
187
- @output.should == "Coverage: 100.0% (threshold: 100%)\n"
187
+ @output.should == "YARD-Coverage: 100.0% (threshold: 100%)\n"
188
188
  end
189
189
  end
190
190
 
@@ -201,10 +201,10 @@ describe Yardstick::Rake::Verify do
201
201
  capture_stdout do
202
202
  @task.verify_measurements
203
203
  end
204
- }.should raise_error(RuntimeError, 'Coverage must be at least 101.0% but was 100.0%')
204
+ }.should raise_error(RuntimeError, 'YARD-Coverage must be at least 101.0% but was 100.0%')
205
205
 
206
206
  # check the stdout output
207
- @output.should == "Coverage: 100.0% (threshold: 101.0%)\n"
207
+ @output.should == "YARD-Coverage: 100.0% (threshold: 101.0%)\n"
208
208
  end
209
209
  end
210
210
 
@@ -221,10 +221,10 @@ describe Yardstick::Rake::Verify do
221
221
  capture_stdout do
222
222
  @task.verify_measurements
223
223
  end
224
- }.should raise_error(RuntimeError, 'Coverage has increased above the threshold of 99.9% to 100.0%. You should update your threshold value.')
224
+ }.should raise_error(RuntimeError, 'YARD-Coverage has increased above the threshold of 99.9% to 100.0%. You should update your threshold value.')
225
225
 
226
226
  # check the stdout output
227
- @output.should == "Coverage: 100.0% (threshold: 99.9%)\n"
227
+ @output.should == "YARD-Coverage: 100.0% (threshold: 99.9%)\n"
228
228
  end
229
229
  end
230
230
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yardstick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
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-03-02 00:00:00.000000000 Z
12
+ date: 2013-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: backports