minitest-display 0.3.0.pre1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cde9ca73e72519c9e38c1eadef6309ea2ce4c5f8
4
- data.tar.gz: b71238f76d6d80f6f7088f47445e68a56c186bd2
3
+ metadata.gz: 48d4d55407451f1f672008f5b08e08b2e5a8b53b
4
+ data.tar.gz: 7a6638224049a9703ce2f45320519e1248e4d385
5
5
  SHA512:
6
- metadata.gz: 69cde4c3299d922748b38366f0f55c20e4ddf81a309926e2703a974d2c4a58f41e4bf3eb104620b9766c4d6daaf77ca166b685591ebafe182eb9c69ae1c4ee54
7
- data.tar.gz: 37c1c7e1d84d801f7a224ba8202545c683277f62065936a28c5487c8b617174825215a931afac12c13c8c2f1d61d2bdacfa9d7bb8241686e10b38ecfd1ee0c31
6
+ metadata.gz: 191907f4d3ee47711de8621952f5e57329295023c2b388c0251bd18f9bb8002842c1773ef3d54ee474858227c9ab7c3c7d620a5bc3e94b7e9418f44c16086eb5
7
+ data.tar.gz: 86ca36a210cc82ce1e0353458159540e1f81884566b0ae0924352c0a2f8a982258698aa5f8801b4aaae13db51a2b3b70f69281e015d56249772bdc10cd026c47
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "minitest", ">= 5.0"
3
+ gem "minitest", "~> 5.0"
4
4
 
5
5
  group :development do
6
6
  gem "bundler", "~> 1.0"
@@ -48,4 +48,4 @@ PLATFORMS
48
48
  DEPENDENCIES
49
49
  bundler (~> 1.0)
50
50
  jeweler (~> 1.5)
51
- minitest (>= 5.0)
51
+ minitest (~> 5.0)
data/README.md CHANGED
@@ -12,7 +12,10 @@ Needless to say, it's a work in progress.
12
12
 
13
13
  ## Requirements
14
14
 
15
- Requires Ruby 1.8.7 or 1.9 and the gem version of minitest >= 2.0.2
15
+ Requires Ruby > 1.9
16
+
17
+ For Minitest 4 use minitest-display ~> 0.2
18
+ For Minitest 5 use minitest-display >= 0.3.0
16
19
 
17
20
  ## Usage
18
21
 
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  module Minitest
22
22
  module Display
23
- VERSION = '0.3.0.pre1'
23
+ VERSION = '0.3.0'
24
24
 
25
25
  class << self
26
26
  def options
@@ -149,33 +149,35 @@ module Minitest
149
149
 
150
150
  def record_suite_started(suite)
151
151
  if display.options[:suite_names] && display.printable_suite?(suite)
152
- suite_header ||= suite.to_s
153
- print display.color("\n#{suite_header}#{display.options[:suite_divider]}", :suite)
154
- @wrap_at = display.options[:wrap_at] - suite_header.length
152
+ @suite_header = suite.to_s
153
+ print display.color("\n#{@suite_header}#{display.options[:suite_divider]}", :suite)
154
+ @wrap_at = display.options[:wrap_at] - @suite_header.length
155
155
  @wrap_count = @wrap_at
156
156
  end
157
- @suite_start = Time.now
157
+ @suite_started = Time.now
158
158
  run_recorder_method(:record_suite_started, suite)
159
159
  end
160
160
 
161
161
  def record_suite_finished(suite)
162
162
  @suite_finished = Time.now
163
- time = start.to_i - finished.to_i
164
- print "\n#{' ' * suite_header.length}#{display.options[:suite_divider]}"
163
+ time = @suite_finished.to_f - @suite_started.to_f
164
+ print "\n#{' ' * @suite_header.length}#{display.options[:suite_divider]}"
165
165
  print "%.2f s" % time
166
166
  run_recorder_method(:record_suite_finished, suite, @assertions, time)
167
167
  end
168
168
 
169
169
  def start
170
170
  @test_times ||= Hash.new { |h, k| h[k] = [] }
171
- @tests_started = Time.now.to_i
171
+ @tests_started = Time.now.to_f
172
172
  run_recorder_method(:record_tests_started)
173
173
  end
174
174
 
175
175
  def report
176
+ record_suite_finished(@current_suite) if @current_suite
177
+ puts
176
178
  display_slow_tests if display.options[:output_slow]
177
179
  display_slow_suites if display.options[:output_slow_suites]
178
- run_recorder_method(:record_tests_finished, @total_tests, @total_assertions, @total_failures, @total_errors, Time.now.to_i - @tests_started)
180
+ run_recorder_method(:record_tests_finished, @total_tests, @total_assertions, @total_failures, @total_errors, Time.now.to_f - @tests_started)
179
181
  end
180
182
 
181
183
  def record(result)
@@ -202,7 +204,7 @@ module Minitest
202
204
 
203
205
  @wrap_count -= 1
204
206
  if @wrap_count == 0
205
- print "\n#{' ' * suite.to_s.length}#{display.options[:suite_divider]}"
207
+ print "\n#{' ' * @suite_header.length}#{display.options[:suite_divider]}"
206
208
  @wrap_count = @wrap_at
207
209
  end
208
210
 
@@ -5,7 +5,7 @@ module Minitest
5
5
 
6
6
  def self.plugin_display_init(options)
7
7
  self.reporter.reporters.reject! {|r| r.class == Minitest::ProgressReporter }
8
- self.reporter.reporters << Minitest::Display::Reporter.new
8
+ self.reporter.reporters.unshift Minitest::Display::Reporter.new
9
9
  end
10
10
 
11
11
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: minitest-display 0.3.0.pre1 ruby lib
5
+ # stub: minitest-display 0.3.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "minitest-display"
9
- s.version = "0.3.0.pre1"
9
+ s.version = "0.3.0"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Aaron Quint"]
14
- s.date = "2014-12-19"
14
+ s.date = "2014-12-22"
15
15
  s.description = "Patches MiniTest to allow for an easily configurable output. For Ruby 1.9 :Datches MiniTest to allow for an easily configurable output. For Ruby 1.9 :D. Inspired by leftright, redgreen and other test output gems, with an emphasis on configuration and style"
16
16
  s.email = "aaron@quirkey.com"
17
17
  s.extra_rdoc_files = [
@@ -42,16 +42,16 @@ Gem::Specification.new do |s|
42
42
  s.specification_version = 4
43
43
 
44
44
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_runtime_dependency(%q<minitest>, [">= 5.0"])
45
+ s.add_runtime_dependency(%q<minitest>, ["~> 5.0"])
46
46
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
47
47
  s.add_development_dependency(%q<jeweler>, ["~> 1.5"])
48
48
  else
49
- s.add_dependency(%q<minitest>, [">= 5.0"])
49
+ s.add_dependency(%q<minitest>, ["~> 5.0"])
50
50
  s.add_dependency(%q<bundler>, ["~> 1.0"])
51
51
  s.add_dependency(%q<jeweler>, ["~> 1.5"])
52
52
  end
53
53
  else
54
- s.add_dependency(%q<minitest>, [">= 5.0"])
54
+ s.add_dependency(%q<minitest>, ["~> 5.0"])
55
55
  s.add_dependency(%q<bundler>, ["~> 1.0"])
56
56
  s.add_dependency(%q<jeweler>, ["~> 1.5"])
57
57
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-display
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.pre1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Quint
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2014-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
@@ -91,9 +91,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 1.3.1
96
+ version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
99
  rubygems_version: 2.2.2