yardstick 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'rake'
2
2
 
3
+ include FileUtils
4
+
3
5
  FileList['tasks/**/*.rake'].each { |task| import task }
4
6
 
5
7
  task :default => :spec
@@ -53,7 +53,7 @@ module Yardstick
53
53
  #
54
54
  # @api public
55
55
  def coverage
56
- empty? ? 0 : Rational(successful, total)
56
+ empty? ? 1 : Rational(successful, total)
57
57
  end
58
58
 
59
59
  # Warn the unsuccessful measurements and a summary
@@ -1,3 +1,3 @@
1
1
  module Yardstick
2
- VERSION = '0.9.0'.freeze
2
+ VERSION = '0.9.1'.freeze
3
3
  end # module Yardstick
@@ -211,8 +211,8 @@ describe Yardstick::MeasurementSet do
211
211
 
212
212
  describe '#coverage' do
213
213
  describe 'when there are no measurements' do
214
- it 'should return 0' do
215
- @measurements.coverage.should eql(0)
214
+ it 'should return 1' do
215
+ @measurements.coverage.should eql(1)
216
216
  end
217
217
  end
218
218
 
@@ -189,7 +189,7 @@ describe Yardstick::Rake::Verify do
189
189
  describe 'with threshold not met' do
190
190
  before do
191
191
  @task = Yardstick::Rake::Verify.new do |verify|
192
- verify.threshold = 0.1
192
+ verify.threshold = 101.0
193
193
  verify.path = 'spec/spec_helper.rb'
194
194
  end
195
195
  end
@@ -199,10 +199,10 @@ describe Yardstick::Rake::Verify do
199
199
  capture_stdout do
200
200
  @task.verify_measurements
201
201
  end
202
- }.should raise_error(RuntimeError, 'Coverage must be at least 0.1% but was 0.0%')
202
+ }.should raise_error(RuntimeError, 'Coverage must be at least 101.0% but was 100.0%')
203
203
 
204
204
  # check the stdout output
205
- @output.should == "Coverage: 0.0% (threshold: 0.1%)\n"
205
+ @output.should == "Coverage: 100.0% (threshold: 101.0%)\n"
206
206
  end
207
207
  end
208
208
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yardstick
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Kubb
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-20 00:00:00 Z
18
+ date: 2013-01-27 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: backports