matest 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/matest.rb +1 -0
- data/lib/matest/capture_exception.rb +14 -0
- data/lib/matest/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a20475ba5064a302ebc0c15c66b89d1397aca7cd
|
4
|
+
data.tar.gz: 44348821c95ddb0fc69359db9bcac993f31e1eb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3280a9e1c7067cfbf03ffa82ca7c7eabe51e7b5c348e399320564d60beb3686bafb0bc39f61ea983b8f6ffd33d615dea0adbafd78daaf4234c1d864c28bdfc7
|
7
|
+
data.tar.gz: ab3739128bdf8f4a53741af7c6d3e1b8ac1749b005996e424b3535e42c6108d8ec9c956661199d8c7e251620fe148362fa5fd777fa2343e195a3aaec6dfbff66
|
data/lib/matest.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
class NoExceptionRaised < RuntimeError; end
|
2
|
+
class UnexpectedExceptionRaised < RuntimeError; end
|
3
|
+
|
4
|
+
def capture_exception(exception_class=BasicObject, &block)
|
5
|
+
begin
|
6
|
+
block.call
|
7
|
+
raise NoExceptionRaised.new
|
8
|
+
false
|
9
|
+
rescue exception_class => e
|
10
|
+
e
|
11
|
+
rescue BasicObject => e
|
12
|
+
raise UnexpectedExceptionRaised.new
|
13
|
+
end
|
14
|
+
end
|
data/lib/matest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Iachetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- Rakefile
|
82
82
|
- bin/matest
|
83
83
|
- lib/matest.rb
|
84
|
+
- lib/matest/capture_exception.rb
|
84
85
|
- lib/matest/color.rb
|
85
86
|
- lib/matest/configure.rb
|
86
87
|
- lib/matest/evaluator.rb
|