minitest-fail 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minitest/fail_plugin.rb +1 -1
- data/minitest-fail.gemspec +1 -1
- data/test/minitest/fail_test.rb +9 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb7ea0cdae496992e62f48d48b6ffa9383e1e5f
|
4
|
+
data.tar.gz: 8fb79935f20fd2d3b21d9e90a586b1f1763c3279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edf8ec90add40c4802f2078b777f896edbd1a56df16b75e99b2c0483b0e81b152f1bcdb4278c5e10f389892ec18c3ab20cc69b0b518f9a52ce12efd614a9ab93
|
7
|
+
data.tar.gz: 29b84ca8cef5513d50ace062a1611d7611b0323bc24ad94122f1781c278170a391e622c97556c5c5ddc599515ed0849e134194d76351e5e46eec8b1d626cd64a
|
data/lib/minitest/fail_plugin.rb
CHANGED
@@ -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
|
29
|
+
e = ::Minitest::Assertion.new "Empty test <#{result}>"
|
30
30
|
|
31
31
|
e.class.send :define_method, :location, -> { empty_test.join(":") }
|
32
32
|
|
data/minitest-fail.gemspec
CHANGED
data/test/minitest/fail_test.rb
CHANGED
@@ -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
|
21
|
-
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|