spec 5.0.15 → 5.0.16
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 +4 -4
- data/lib/minitest.rb +19 -3
- data/release_notes.md +6 -0
- data/test/manual/trace2.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59684a7457335516f5fa0d7ad8fdb2bbd256b849
|
4
|
+
data.tar.gz: a0606a03e5b73d3ed796e7759a9f082d655abf55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8066f3efcc272b02b2746b6ce8519b210bee804ce011c42b0c0e59ed016ddb910de321e2d88d994a6bd2f3e767d1efed3fe460cb13f7bd8cebe0d336c3cd35f
|
7
|
+
data.tar.gz: 8823466ce4f0390e97d523b54bf561587a3bd90909a20edcc50d28ac462c86c50ef90c6e2bc9e074a786eb24a59b9c683f61b2024a99a8977933e5d5b4bd4811
|
data/lib/minitest.rb
CHANGED
@@ -5,8 +5,8 @@ require 'chronic_duration'
|
|
5
5
|
# :include: README.txt
|
6
6
|
|
7
7
|
module Minitest
|
8
|
-
VERSION = '5.0.
|
9
|
-
DATE = '2013-08-
|
8
|
+
VERSION = '5.0.16' # :nodoc:
|
9
|
+
DATE = '2013-08-10' # :nodoc:
|
10
10
|
|
11
11
|
@@installed_at_exit ||= false
|
12
12
|
@@after_run = []
|
@@ -331,6 +331,7 @@ module Minitest
|
|
331
331
|
# reporter to record.
|
332
332
|
|
333
333
|
def self.run reporter, options = {}
|
334
|
+
io = options.fetch :io, $stdout
|
334
335
|
filter = options[:filter] || '/./'
|
335
336
|
filter = Regexp.new $1 if filter =~ /\/(.*)\//
|
336
337
|
|
@@ -357,7 +358,22 @@ module Minitest
|
|
357
358
|
|
358
359
|
# run the other methods
|
359
360
|
filtered_methods.each do |method_name|
|
360
|
-
|
361
|
+
method = self.new(method_name)
|
362
|
+
matched_name = method_name.match /test_(\d+)_/
|
363
|
+
if matched_name
|
364
|
+
test_number = matched_name[1].to_i
|
365
|
+
test_name = method_name.split(/_\d+_/).last
|
366
|
+
file_path, line_number = method.method(method_name).source_location
|
367
|
+
# /5/4/3/2/1/test.rb => 2/1/test.rb
|
368
|
+
file_path = file_path.split(File::SEPARATOR).reject(&:empty?)
|
369
|
+
file_path = (file_path.length >= 3 ? file_path[-3..-1] :
|
370
|
+
file_path).join(File::SEPARATOR)
|
371
|
+
# 36 = cyan, 0 = clear
|
372
|
+
test_output_title = "\e[36m#{test_name} | #{test_number} |" +
|
373
|
+
"#{file_path}:#{line_number}\e[0m"
|
374
|
+
io.puts test_output_title
|
375
|
+
end
|
376
|
+
result = method.run
|
361
377
|
raise "#{self}#run _must_ return self" unless self === result
|
362
378
|
reporter.record result
|
363
379
|
check_failures result, reporter
|
data/release_notes.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
#### v5.0.15 2013-08-07
|
2
|
+
|
3
|
+
- [c1f227c](https://github.com/bootstraponline/spec/commit/c1f227ca8f2803d2fe4da8caf7106f8cdda206e6) Release 5.0.15
|
4
|
+
- [df3f638](https://github.com/bootstraponline/spec/commit/df3f6387c4517962e53e577e980cbf9aed13eac9) Trace everytime run_specs is invoked
|
5
|
+
|
6
|
+
|
1
7
|
#### v5.0.14 2013-08-07
|
2
8
|
|
3
9
|
- [c5199e7](https://github.com/bootstraponline/spec/commit/c5199e7ae2578bb15a684210ba771d4db237121b) Release 5.0.14
|
data/test/manual/trace2.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chronic_duration
|