minitest 5.3.2 → 5.3.3

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: 5aac9df3288de592f21af87f69b9595380cc4dbc
4
- data.tar.gz: 06538f9e85ffa475902b3e23a880cddc2eee7d59
3
+ metadata.gz: 4aceef550a127524766d1adec2b2c09e90cceca6
4
+ data.tar.gz: a73ae540da8c8bcf1806e238c9c940f145ff779f
5
5
  SHA512:
6
- metadata.gz: f47b7e0716d186dc74cda94e0bf416cd9c79847b3ff9d534b4edbef8584aed1e14eaa72828c2d0e66dfb3c91a85c907ecc4257651c1955cd24088a9fd6dc7502
7
- data.tar.gz: 4365da2c8862b71c25bd71272bb1f65598db72bc6b1b51740e1b4219acbd1084267ca47bf435d7bf20680fa31492a3611b9e22a35ee9394e9af5b70572e4affc
6
+ metadata.gz: 37ec5a609f28a0bb9cbb20cfec26a3d5cc591de9ab8e8bcfc1ebfda0c352bb2679946f2b53429d8e5f86b2aa38da9904b294c623c5b97dc2e50723eb166c2a01
7
+ data.tar.gz: 0e3ec800aabda96727342e9fcedac231990093742935191eb1d20e6d133645603b053030be42459e1451a0437d78eb8df190912bb4ac36e273f0c5ca03d08cc8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 5.3.3 / 2014-04-14
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed using expectations w/ DSL in Test class w/o describe. (blowmage+others)
6
+
1
7
  === 5.3.2 / 2014-04-02
2
8
 
3
9
  * 1 bug fix:
@@ -7,7 +7,7 @@ require "minitest/parallel"
7
7
  # :include: README.txt
8
8
 
9
9
  module Minitest
10
- VERSION = "5.3.2" # :nodoc:
10
+ VERSION = "5.3.3" # :nodoc:
11
11
 
12
12
  @@installed_at_exit ||= false
13
13
  @@after_run = []
@@ -267,6 +267,18 @@ class Minitest::Spec < Minitest::Test
267
267
  # :stopdoc:
268
268
  attr_reader :desc
269
269
  alias :specify :it
270
+
271
+ module InstanceMethods
272
+ def before_setup
273
+ super
274
+ Thread.current[:current_spec] = self
275
+ end
276
+ end
277
+
278
+ def self.extended obj
279
+ obj.send :include, InstanceMethods
280
+ end
281
+
270
282
  # :startdoc:
271
283
  end
272
284
 
@@ -681,6 +681,24 @@ class TestMeta < MetaMetaMetaTestCase
681
681
  Minitest::Spec::TYPES.replace original_types
682
682
  end
683
683
 
684
+ def test_bug_dsl_expectations
685
+ spec_class = Class.new MiniSpecB do
686
+ it "should work" do
687
+ 0.must_equal 0
688
+ end
689
+ end
690
+
691
+ test_name = spec_class.instance_methods.sort.grep(/test/).first
692
+
693
+ spec = spec_class.new test_name
694
+
695
+ result = spec.run
696
+
697
+ assert spec.passed?
698
+ assert result.passed?
699
+ assert_equal 1, result.assertions
700
+ end
701
+
684
702
  def test_name
685
703
  spec_a = describe ExampleA do; end
686
704
  spec_b = describe ExampleB, :random_method do; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.2
4
+ version: 5.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2014-04-02 00:00:00.000000000 Z
32
+ date: 2014-04-14 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rdoc
metadata.gz.sig CHANGED
Binary file