maxitest 1.3.1 → 1.4.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: ddbc716d2ce9c7847439a4ec7302880845fc86d0
4
- data.tar.gz: 50b2162033a44df101facdefc1cee72461df8ca5
3
+ metadata.gz: 949574f2992e817620fb47fc1db266f04c45e771
4
+ data.tar.gz: b634fdbefd9c93dc57514bb233282cdd27b23c44
5
5
  SHA512:
6
- metadata.gz: 826e30c5b3d883d589d283b089962a7b7a4472c08afbc2f3c79f5e76c6d4f612a310915753c4b59f1f515b10b1700affa041aa33f321f4dc7d7857b67870e7b6
7
- data.tar.gz: 5b80591f85031ffdd28c7e51044f332e49f0b260d076a7dab4c372a6156c81922316a2cde7fa299f30636337d37f7ab9c669dc4dca02668b4d4cdace5470a7e2
6
+ metadata.gz: 2d7e791279b187bba2671f143b1021cf48d00058bc5eb06c3c3f4e5022ecd2cdfe365a922a24baa53b453a90ee65e0613d4a6eec0f676177860db6ee920d5b51
7
+ data.tar.gz: daabe85c44ff1d77b5f481924d8563a6120cf6548baa50dabaca44cf5361c56c87fdfe1a9d8c0daed895d70d0fe0e36fa032d2ae7ddb3622a471fc4849d405f3
@@ -15,8 +15,10 @@ require "minitest/autorun"
15
15
  require "maxitest/vendor/around"
16
16
  require "maxitest/trap"
17
17
  require "maxitest/let_bang"
18
+ require "maxitest/let_all"
18
19
  require "maxitest/pending"
19
20
  require "maxitest/xit"
21
+ require "maxitest/static_class_order"
20
22
 
21
23
  Minitest::Spec::DSL.send(:alias_method, :context, :describe)
22
24
 
@@ -0,0 +1,12 @@
1
+ Minitest::Spec::DSL.class_eval do
2
+ def let_all(name, &block)
3
+ cache = []
4
+ define_method(name) do
5
+ if cache.empty?
6
+ cache[0] = instance_eval(&block)
7
+ else
8
+ cache[0]
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,19 @@
1
+ module Maxitest
2
+ class << self
3
+ attr_accessor :static_class_order
4
+ end
5
+ end
6
+
7
+ class << Minitest::Runnable
8
+ alias_method :runnables_without_static_order, :runnables
9
+
10
+ def runnables
11
+ return runnables_without_static_order unless Maxitest.static_class_order
12
+ # Minitest.__run uses Runnable.runnables.shuffle -> hack it
13
+ runnables = runnables_without_static_order
14
+ def runnables.shuffle
15
+ self
16
+ end
17
+ runnables
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Maxitest
2
- VERSION = "1.3.1"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -98,8 +98,10 @@ files:
98
98
  - lib/maxitest.rb
99
99
  - lib/maxitest/autorun.rb
100
100
  - lib/maxitest/implicit_subject.rb
101
+ - lib/maxitest/let_all.rb
101
102
  - lib/maxitest/let_bang.rb
102
103
  - lib/maxitest/pending.rb
104
+ - lib/maxitest/static_class_order.rb
103
105
  - lib/maxitest/trap.rb
104
106
  - lib/maxitest/vendor/around.rb
105
107
  - lib/maxitest/vendor/line.rb