minitest 5.0.1 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 5.0.2 / 2013-05-20
2
+
3
+ * 3 bug fixes:
4
+
5
+ * Gem.find_files is smarter than I remember... cause I wrote it that way. *sigh* I'm getting old.
6
+ * Pride wasn't doing puts through its #io. (tmiller/tenderlove)
7
+ * Replaced Runnable#dup and Test#dup with marshal_dump/load. Too many problems cropping up on untested rails code. (tenderlove/rubys)
8
+
1
9
  === 5.0.1 / 2013-05-14
2
10
 
3
11
  * 2 bug fixes:
data/README.txt CHANGED
@@ -248,7 +248,7 @@ bogus example:
248
248
  end
249
249
  end
250
250
 
251
- def self.plugin_bogus_init
251
+ def self.plugin_bogus_init(options)
252
252
  ARGV << "-p" # all pride, all the time
253
253
  self.reporter << MyCI.new if options[:myci]
254
254
  end
@@ -369,6 +369,7 @@ minitest-reporters :: Create customizable MiniTest output formats
369
369
  minitest-should_syntax :: RSpec-style +x.should == y+ assertions for MiniTest
370
370
  minitest-shouldify :: Adding all manner of shoulds to MiniTest (bad idea)
371
371
  minitest-spec-context :: Provides rspec-ish context method to MiniTest::Spec
372
+ minitest-spec-expect :: Expect syntax for MiniTest::Spec - expect(sequences).to_include :celery_man
372
373
  minitest-spec-magic :: Minitest::Spec extensions for Rails and beyond
373
374
  minitest-spec-rails :: Drop in MiniTest::Spec superclass for ActiveSupport::TestCase.
374
375
  minitest-stub-const :: Stub constants for the duration of a block
data/lib/minitest.rb CHANGED
@@ -4,7 +4,7 @@ require "optparse"
4
4
  # :include: README.txt
5
5
 
6
6
  module Minitest
7
- VERSION = "5.0.1" # :nodoc:
7
+ VERSION = "5.0.2" # :nodoc:
8
8
 
9
9
  @@installed_at_exit ||= false
10
10
  @@after_run = []
@@ -70,7 +70,7 @@ module Minitest
70
70
 
71
71
  seen = {}
72
72
 
73
- Gem.find_files("minitest/*_plugin.rb").reverse.each do |plugin_path|
73
+ Gem.find_files("minitest/*_plugin.rb").each do |plugin_path|
74
74
  name = File.basename plugin_path, "_plugin.rb"
75
75
 
76
76
  next if seen[name]
@@ -282,14 +282,12 @@ module Minitest
282
282
  @@runnables
283
283
  end
284
284
 
285
- def dup # :nodoc:
286
- obj = self.class.new self.name
287
-
288
- obj.name = self.name
289
- obj.failures = self.failures.dup
290
- obj.assertions = self.assertions
285
+ def marshal_dump
286
+ [self.name, self.failures, self.assertions]
287
+ end
291
288
 
292
- obj
289
+ def marshal_load ary
290
+ self.name, self.failures, self.assertions = ary
293
291
  end
294
292
 
295
293
  def failure # :nodoc:
@@ -81,7 +81,7 @@ module Minitest
81
81
  }
82
82
  }
83
83
 
84
- super
84
+ io.puts(*o)
85
85
  end
86
86
 
87
87
  ##
data/lib/minitest/test.rb CHANGED
@@ -87,10 +87,13 @@ module Minitest
87
87
 
88
88
  attr_accessor :time
89
89
 
90
- def dup # :nodoc:
91
- obj = super
92
- obj.time = self.time
93
- obj
90
+ def marshal_dump
91
+ super << self.time
92
+ end
93
+
94
+ def marshal_load ary
95
+ self.time = ary.pop
96
+ super
94
97
  end
95
98
 
96
99
  ##
@@ -638,7 +638,7 @@ class TestMinitestUnitOrder < MetaMetaMetaTestCase
638
638
  end
639
639
 
640
640
  class TestMinitestRunnable < Minitest::Test
641
- def setup_dup klass
641
+ def setup_marshal klass
642
642
  tc = klass.new "whatever"
643
643
  tc.assertions = 42
644
644
  tc.failures << "a failure"
@@ -653,8 +653,8 @@ class TestMinitestRunnable < Minitest::Test
653
653
  @tc = tc
654
654
  end
655
655
 
656
- def assert_dup expected_ivars
657
- new_tc = @tc.dup
656
+ def assert_marshal expected_ivars
657
+ new_tc = Marshal.load Marshal.dump @tc
658
658
 
659
659
  ivars = new_tc.instance_variables.map(&:to_s).sort
660
660
  assert_equal expected_ivars, ivars
@@ -665,20 +665,20 @@ class TestMinitestRunnable < Minitest::Test
665
665
  yield new_tc if block_given?
666
666
  end
667
667
 
668
- def test_dup
669
- setup_dup Minitest::Runnable
668
+ def test_marshal
669
+ setup_marshal Minitest::Runnable
670
670
 
671
- assert_dup %w(@NAME @assertions @failures)
671
+ assert_marshal %w(@NAME @assertions @failures)
672
672
  end
673
673
  end
674
674
 
675
675
  class TestMinitestTest < TestMinitestRunnable
676
676
  def test_dup
677
- setup_dup Minitest::Test do |tc|
677
+ setup_marshal Minitest::Test do |tc|
678
678
  tc.time = 3.14
679
679
  end
680
680
 
681
- assert_dup %w(@NAME @assertions @failures @time) do |new_tc|
681
+ assert_marshal %w(@NAME @assertions @failures @time) do |new_tc|
682
682
  assert_in_epsilon 3.14, new_tc.time
683
683
  end
684
684
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 5
8
8
  - 0
9
- - 1
10
- version: 5.0.1
9
+ - 2
10
+ version: 5.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2013-05-15 00:00:00 Z
39
+ date: 2013-05-20 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
metadata.gz.sig CHANGED
Binary file