maxitest 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/maxitest/timeout.rb +5 -3
- data/lib/maxitest/version.rb +1 -1
- 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: 8f2001796af195514438fa52362627e60627b0ac
|
4
|
+
data.tar.gz: 6f69b87ae24322e2012e95f94d5e7e05d7502e34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d73abd17ee4bcefa1ab9ccc5c0de34dd1f4f069fbe5d7efe704919dbcebc8cca9e7cdd248df0a404b5874baa70db10345ed6dc3d398a2fb39023a1defde6d63
|
7
|
+
data.tar.gz: 353c04c531393053b34347cb065215a1744c2e5768de5fee70ca4f09c7aed820b192b82f4d46adb9ecec7aead3d09496a3f0f8dd89004979bbdfad1fb0d10bfc
|
data/lib/maxitest/timeout.rb
CHANGED
@@ -9,16 +9,18 @@ module Maxitest
|
|
9
9
|
module Timeout
|
10
10
|
class TestCaseTimeout < StandardError
|
11
11
|
def message
|
12
|
-
"Test took too long to finish, aborting. To use a debugger,
|
12
|
+
"Test took too long to finish, aborting. To use a debugger, def maxitest_timeout;false;end in the test file."
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
def capture_exceptions(*, &block)
|
17
|
-
|
17
|
+
# NOTE: having a default def maxitest_timeout would break using let(:maxitest_timeout)
|
18
|
+
timeout = (defined?(maxitest_timeout) ? maxitest_timeout : Maxitest.timeout || 5)
|
19
|
+
if timeout == false
|
18
20
|
super
|
19
21
|
else
|
20
22
|
super do
|
21
|
-
::Timeout.timeout(
|
23
|
+
::Timeout.timeout(timeout, TestCaseTimeout, &block)
|
22
24
|
end
|
23
25
|
end
|
24
26
|
end
|
data/lib/maxitest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maxitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|