maxitest 2.4.1 → 2.5.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: 848feb6c9e853e8ca2de4f81e1737ec1c2f5387d
4
- data.tar.gz: a9319b6e6fb835194b5705d2e92522c06dc77a02
3
+ metadata.gz: 8751837f34154b892be02e8e8a87a4844fd1ab3c
4
+ data.tar.gz: 39dfc14c3511595a641896dc0760d0fa9925826f
5
5
  SHA512:
6
- metadata.gz: bbf593ccf24240bb03e550cb55854f5f2a9d3e80cf01ce7de7d8648e85bc55b729ca6da47bea66925355aa44c0ea5239023ead8432dbcfed59d4fedc819a1336
7
- data.tar.gz: aa39a21ed1df14d3e2c76f3dd9c9e294286ab3ea7ca0f363f417fee150fabc2e900a2d582d377d025974c7836901ee7206c97197129d68534bf26c65054620eb
6
+ metadata.gz: 5f12c872a2baaafdcfabd3fb162967cc9f8646f5e74012a54aa10d138aab7b7e0ac4547c294224e3142ae783ff1a12aaa7e429106cd92c54b9af35e67029835d
7
+ data.tar.gz: af17b7586b92b7b321292f851c5b93b79461acd7ee9b5971feeef1e85d5e0deae55bcbb20288d6bda658cbd2dc2ccbb4d09419de30d67524bd0100fce5bdf94b
data/lib/maxitest/trap.rb CHANGED
@@ -18,7 +18,7 @@ Minitest::Test.class_eval do
18
18
  $!
19
19
  end
20
20
  self.failures = [skip]
21
- self
21
+ defined?(Minitest::Result) ? Minitest::Result.from(self) : self
22
22
  else
23
23
  run_without_stop
24
24
  end
@@ -39,11 +39,12 @@ Minitest::Test.class_eval do
39
39
  alias_method :run_without_around, :run
40
40
  def run(*args)
41
41
  if defined?(around)
42
- around { run_without_around(*args) }
42
+ result = nil
43
+ around { result = run_without_around(*args) }
44
+ result
43
45
  else
44
46
  run_without_around(*args)
45
47
  end
46
- self
47
48
  end
48
49
  end
49
50
  #END generated by rake update, do not modify
@@ -81,4 +82,4 @@ Minitest::Spec::DSL.class_eval do
81
82
  include Module.new { define_method(:teardown) { instance_exec(&block); super() } }
82
83
  end
83
84
  end
84
- #END generated by rake update, do not modify
85
+ #END generated by rake update, do not modify
@@ -103,8 +103,8 @@ module Minitest
103
103
  io.puts "Focus on failing tests:"
104
104
  pwd = Pathname.new(Dir.pwd)
105
105
  @failures.each do |res|
106
- meth = res.method(res.name)
107
- file, line = meth.source_location
106
+ result = (res.respond_to?(:source_location) ? res : res.method(res.name))
107
+ file, line = result.source_location
108
108
  if file
109
109
  file = Pathname.new(file)
110
110
  file = file.relative_path_from(pwd) if file.absolute?
@@ -128,7 +128,7 @@ module Minitest
128
128
  module DescribeTrack
129
129
  def describe(*args, &block)
130
130
  klass = super
131
- klass.instance_variable_set(:@minitest_line_caller, caller[0..5])
131
+ klass.instance_variable_set(:@minitest_line_caller, caller(0..5))
132
132
  klass
133
133
  end
134
134
  end
@@ -136,4 +136,4 @@ module Minitest
136
136
  end
137
137
 
138
138
  Object.send(:include, Minitest::Line::DescribeTrack)
139
- #END generated by rake update, do not modify
139
+ #END generated by rake update, do not modify
@@ -1,3 +1,3 @@
1
1
  module Maxitest
2
- VERSION = "2.4.1"
2
+ VERSION = "2.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.5.1
135
+ rubygems_version: 2.6.14
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Minitest + all the features you always wanted