spec 5.0.15 → 5.0.16

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: 305fdfe34980607164fe672d11337a5c326fec13
4
- data.tar.gz: 0c4b6ca37d83f6056e433ce3a887205b9b437317
3
+ metadata.gz: 59684a7457335516f5fa0d7ad8fdb2bbd256b849
4
+ data.tar.gz: a0606a03e5b73d3ed796e7759a9f082d655abf55
5
5
  SHA512:
6
- metadata.gz: 6a0442d8a53dc07fa5bf893083850a13ecc95b8a704b534ab22e5a2165d27b71c57eeac50e75f8a15c4c13c0835a44401d22acb7d140fca69fe62de5f70ff65a
7
- data.tar.gz: cf95f5788fdf26201e052a86afc6c7c7df8e1052686ce7bb2133a07838c282168acae85af3802a9bc932062bd0fd934cccb45e4f7a2c7ec0529571fd051f1198
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.15' # :nodoc:
9
- DATE = '2013-08-07' # :nodoc:
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
- result = self.new(method_name).run
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
@@ -5,10 +5,10 @@ require 'stringio' # stdlib
5
5
  require 'spec' # not 'minitest'
6
6
 
7
7
  describe 'a' do
8
- t('') { 1 }
9
- t('') { 2 }
10
- t('') { 3 }
11
- t('') { 4 }
8
+ t('b') { 1 }
9
+ t('c') { 2 }
10
+ t('d') { 3 }
11
+ t('e') { 4 }
12
12
  end
13
13
 
14
14
  # Run specs and trace this file
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.15
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-07 00:00:00.000000000 Z
11
+ date: 2013-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chronic_duration