minitest 3.1.0 → 3.2.0

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,13 @@
1
+ === 3.2.0 / 2012-06-26
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Stubs now yield self. (peterhellberg)
6
+
7
+ * 1 bug fix:
8
+
9
+ * Fixed verbose test that only fails when run in verbose mode. mmmm irony.
10
+
1
11
  === 3.1.0 / 2012-06-13
2
12
 
3
13
  * 2 minor enhancements:
data/lib/minitest/mock.rb CHANGED
@@ -157,7 +157,7 @@ class Object # :nodoc:
157
157
  end
158
158
  end
159
159
 
160
- yield
160
+ yield self
161
161
  ensure
162
162
  metaclass.send :undef_method, name
163
163
  metaclass.send :alias_method, name, new_name
data/lib/minitest/unit.rb CHANGED
@@ -645,7 +645,7 @@ module MiniTest
645
645
  end
646
646
 
647
647
  class Unit # :nodoc:
648
- VERSION = "3.1.0" # :nodoc:
648
+ VERSION = "3.2.0" # :nodoc:
649
649
 
650
650
  attr_accessor :report, :failures, :errors, :skips # :nodoc:
651
651
  attr_accessor :test_count, :assertion_count # :nodoc:
@@ -20,6 +20,8 @@ class MetaMetaMetaTestCase < MiniTest::Unit::TestCase
20
20
  output.sub!(/Finished tests in .*/, "Finished tests in 0.00")
21
21
  output.sub!(/Loaded suite .*/, 'Loaded suite blah')
22
22
 
23
+ output.gsub!(/ = \d+.\d\d s = /, ' = 0.00 s = ')
24
+
23
25
  if windows? then
24
26
  output.gsub!(/\[(?:[A-Za-z]:)?[^\]:]+:\d+\]/, '[FILE:LINE]')
25
27
  output.gsub!(/^(\s+)(?:[A-Za-z]:)?[^:]+:\d+:in/, '\1FILE:LINE:in')
@@ -261,4 +261,14 @@ class TestMiniTestStub < MiniTest::Unit::TestCase
261
261
 
262
262
  assert_stub obj
263
263
  end
264
+
265
+ def test_stub_yield_self
266
+ obj = "foo"
267
+
268
+ val = obj.stub :to_s, "bar" do |s|
269
+ s.to_s
270
+ end
271
+
272
+ @tc.assert_equal "bar", val
273
+ end
264
274
  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: 3
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 3.1.0
10
+ version: 3.2.0
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: 2012-06-13 00:00:00 Z
39
+ date: 2012-06-26 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  requirements: []
172
172
 
173
173
  rubyforge_project: bfts
174
- rubygems_version: 1.8.17
174
+ rubygems_version: 1.8.24
175
175
  signing_key:
176
176
  specification_version: 3
177
177
  summary: minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking
metadata.gz.sig CHANGED
Binary file