minitest-fail 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddb39085a6146f7255196d01fd1877c34b2f279a
4
- data.tar.gz: 05723b0d8a3bb8da38c09d88b98f704e2fbc52cb
3
+ metadata.gz: 4bb7ea0cdae496992e62f48d48b6ffa9383e1e5f
4
+ data.tar.gz: 8fb79935f20fd2d3b21d9e90a586b1f1763c3279
5
5
  SHA512:
6
- metadata.gz: 8f1fadc43407750458d8df4dc2e113c7972605f1f8f92458092412c3567fe47fb256e386e2c72f3f193744d80f8d70f0a16756f02d1121b6193dae5182729d15
7
- data.tar.gz: b8944ff53fea7f40412c79d23212fc347e6722a152f72aacfe6433e71a79cfdb1b0f5df15d68db84345019a292488765c334c962c27c5bc26bfd14018cd7a906
6
+ metadata.gz: edf8ec90add40c4802f2078b777f896edbd1a56df16b75e99b2c0483b0e81b152f1bcdb4278c5e10f389892ec18c3ab20cc69b0b518f9a52ce12efd614a9ab93
7
+ data.tar.gz: 29b84ca8cef5513d50ace062a1611d7611b0323bc24ad94122f1781c278170a391e622c97556c5c5ddc599515ed0849e134194d76351e5e46eec8b1d626cd64a
@@ -26,7 +26,7 @@ module Minitest
26
26
  super
27
27
  if result.assertions.zero?
28
28
  empty_test = result.method(result.name).source_location
29
- e = ::Minitest::Assertion.new "Empty test #{result}"
29
+ e = ::Minitest::Assertion.new "Empty test <#{result}>"
30
30
 
31
31
  e.class.send :define_method, :location, -> { empty_test.join(":") }
32
32
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "minitest-fail"
5
- spec.version = "0.0.2"
5
+ spec.version = "0.0.3"
6
6
  spec.authors = ["Teo Ljungberg"]
7
7
  spec.email = ["teo.ljungberg@gmail.com"]
8
8
  spec.summary = %q{Make an empty test fail}
@@ -11,34 +11,30 @@ module Minitest
11
11
  def test_fail_bang
12
12
  activate_fail!
13
13
  assert Fail.fail?
14
- ensure
15
- fail_off!
16
14
  end
17
15
  end
18
16
 
19
17
  class FailIntegrationTest < TestCase
20
- def test_integration_represent_empty_tests_as_failures
21
- activate_fail!
18
+ def exp_error
19
+ %r(Empty test <#<Class:(.*)>#test_empty>)
20
+ end
22
21
 
22
+ def run_tests
23
23
  reporter.start
24
24
  reporter.record example_test.new(:test_empty).run
25
25
  reporter.report
26
+ end
26
27
 
27
- exp_error = %r(Empty test #<Class:(.*)>#test_empty)
28
+ def test_integration_represent_empty_tests_as_failures
29
+ activate_fail!
30
+ run_tests
28
31
 
29
32
  assert_match exp_error, io.string
30
- ensure
31
- fail_off!
32
33
  end
33
34
 
34
35
  def test_integration_fail_needs_to_be_activated
35
36
  fail_off!
36
-
37
- reporter.start
38
- reporter.record example_test.new(:test_empty).run
39
- reporter.report
40
-
41
- exp_error = %r(Empty test, #<Class:(.*)>#test_empty)
37
+ run_tests
42
38
 
43
39
  refute_match exp_error, io.string
44
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-fail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Teo Ljungberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-06 00:00:00.000000000 Z
11
+ date: 2014-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest