maxitest 2.8.0 → 3.0.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
  SHA256:
3
- metadata.gz: 185537a04c24f97f640c3bccbe044ff03d2c7da036db8cdcc9d336731745d5b6
4
- data.tar.gz: 73eda2564df5355bb68b0674625fc27826309135330f0cb29178b6ce9120ae36
3
+ metadata.gz: 5507ffddba92d47b8bc4ec4070bcd47782bbedad14e0bd44d18604bf846b35c1
4
+ data.tar.gz: 9a05fb464dd4062fb9f1d1085ff82626e17bf44dbad072cdc41fef5d306172d5
5
5
  SHA512:
6
- metadata.gz: 0eb408cbd86df9eacd675e1141eb53800b94a2996e263a6d804d7addba159550b469ca5ae873332121566082f7063da44690204172219d842e352328f39a396b
7
- data.tar.gz: 84015960efe73035b90a2f27049f5a09657199c36c29744e6603087b9f54c3c41fd60eaf28410744bd3a478929e9da22d142cfff904524327b709e1147da7610
6
+ metadata.gz: c989443e1f5bf3ec8ad54e9d9bb9265f04835699162c1a6039d2aa06fc7bbb9da33c4938a61f56cf1a022fd380ba5e45ed11cf210595140c6d2db1e53aff1ffe
7
+ data.tar.gz: c56f5faa5678dc084007bae636b8287755f2472a49e8476060074269a254986457f7a3d5203535f557ebedb16d22721d8d96e4170a83dd0e6200d5f1c166f7a9
@@ -1,30 +1,5 @@
1
1
  require "minitest"
2
-
3
- disabled_for_rails = begin
4
- require 'rails/version'
5
- Rails::VERSION::MAJOR >= 5
6
- rescue LoadError
7
- ENV['MAXITEST_ENABLED_WITH_RAILS5'] # a way to get this back when on rails 5
8
- end
9
-
10
- if !disabled_for_rails && $stdout.tty? # rails 5 add default red/green output
11
- require "maxitest/vendor/rg"
12
- Minitest.extensions << "rg"
13
- Minitest::RG.rg!
14
- end
15
-
16
- require "maxitest/verbose_backtrace"
17
-
18
- unless disabled_for_rails # rails 5 breaks line support + has it's own line number runner
19
- require "maxitest/vendor/line"
20
- Minitest.extensions << "line"
21
- end
22
-
23
- if disabled_for_rails
24
- require "minitest/spec"
25
- else # rails 5 causes this to trigger a duplicate run
26
- require "minitest/autorun"
27
- end
2
+ require "minitest/autorun"
28
3
  require "maxitest/vendor/around"
29
4
  require "maxitest/trap"
30
5
  require "maxitest/let_bang"
@@ -32,6 +7,11 @@ require "maxitest/let_all"
32
7
  require "maxitest/pending"
33
8
  require "maxitest/xit"
34
9
  require "maxitest/static_class_order"
10
+ require "maxitest/vendor/line_describe" # not a plugin
11
+
12
+ module Maxitest
13
+ ENABLE_PLUGINS = true
14
+ end
35
15
 
36
16
  Minitest::Spec::DSL.send(:alias_method, :context, :describe)
37
17
 
@@ -120,20 +120,3 @@ module Minitest
120
120
  end
121
121
  end
122
122
  #END generated by rake update, do not modify
123
-
124
- # https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line/describe_track.rb
125
- # BEGIN generated by rake update, do not modify
126
- module Minitest
127
- module Line
128
- module DescribeTrack
129
- def describe(*args, &block)
130
- klass = super
131
- klass.instance_variable_set(:@minitest_line_caller, caller(0..5))
132
- klass
133
- end
134
- end
135
- end
136
- end
137
-
138
- Object.send(:include, Minitest::Line::DescribeTrack)
139
- #END generated by rake update, do not modify
@@ -0,0 +1,16 @@
1
+ # https://raw.githubusercontent.com/judofyr/minitest-line/master/lib/minitest/line/describe_track.rb
2
+ # BEGIN generated by rake update, do not modify
3
+ module Minitest
4
+ module Line
5
+ module DescribeTrack
6
+ def describe(*args, &block)
7
+ klass = super
8
+ klass.instance_variable_set(:@minitest_line_caller, caller(0..5))
9
+ klass
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ Object.send(:include, Minitest::Line::DescribeTrack)
16
+ #END generated by rake update, do not modify
@@ -1,3 +1,3 @@
1
1
  module Maxitest
2
- VERSION = "2.8.0"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -0,0 +1,25 @@
1
+ # we are not enabling our extensions unless maxitest/autorun was loaded
2
+ # minitests plugin system auto-loads all files in the load path and that would
3
+ # always enable all our plugins even if they were not wanted
4
+ if defined?(Maxitest::ENABLE_PLUGINS) && Maxitest::ENABLE_PLUGINS
5
+ disabled_for_rails = begin
6
+ require 'rails/version'
7
+ Rails::VERSION::MAJOR >= 5
8
+ rescue LoadError
9
+ false
10
+ end
11
+
12
+ # rails has --backtrace which disables rails own backtrace cleaner, but not minitests
13
+ require "maxitest/verbose_backtrace"
14
+
15
+ unless disabled_for_rails # rails 5 add default red/green output
16
+ require "maxitest/vendor/rg"
17
+ Minitest.extensions << "rg"
18
+ Minitest::RG.rg!
19
+ end
20
+
21
+ unless disabled_for_rails # rails 5 breaks line support + has it's own line number runner
22
+ require "maxitest/vendor/line"
23
+ Minitest.extensions << "line"
24
+ end
25
+ 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.8.0
4
+ version: 3.0.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-03-16 00:00:00.000000000 Z
11
+ date: 2018-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -108,11 +108,13 @@ files:
108
108
  - lib/maxitest/trap.rb
109
109
  - lib/maxitest/vendor/around.rb
110
110
  - lib/maxitest/vendor/line.rb
111
+ - lib/maxitest/vendor/line_describe.rb
111
112
  - lib/maxitest/vendor/rg.rb
112
113
  - lib/maxitest/vendor/testrbl.rb
113
114
  - lib/maxitest/verbose_backtrace.rb
114
115
  - lib/maxitest/version.rb
115
116
  - lib/maxitest/xit.rb
117
+ - lib/minitest/maxitest_plugin.rb
116
118
  homepage: https://github.com/grosser/maxitest
117
119
  licenses:
118
120
  - MIT
@@ -133,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
135
  version: '0'
134
136
  requirements: []
135
137
  rubyforge_project:
136
- rubygems_version: 2.7.3
138
+ rubygems_version: 2.7.6
137
139
  signing_key:
138
140
  specification_version: 4
139
141
  summary: Minitest + all the features you always wanted