matest 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2448b223b54086b961d6c5b96130d1296ff55508
4
- data.tar.gz: 10a0a8830bfacb9c6db403704f821534ba3e7a1d
3
+ metadata.gz: c614bca6c6b527d39890dc37557059b3bac997fe
4
+ data.tar.gz: bc099b1483b4d64002300fc92056283ddaede281
5
5
  SHA512:
6
- metadata.gz: 1ebda59e621cd3450c615a4b0c1ed141f562fd1181ce46c6315371f86dbda5085225a1e85efa9d65561a008570fc8923411604144d443107c89b3159b4f734c2
7
- data.tar.gz: cd3213ab23b35c487b730fd127af012b707d5a85122a4a4df2e38f28747ea8cb7e0dc98311d4321d01eaac3b1c89e7cc06f6e48125265862e19c2e9675c37042
6
+ metadata.gz: 21fe688fa7c433566315b57523ad5d7982fb6debfd090ff7002ee4e1dbc1410c5bc216cae4fb8166a6197ece6599179facb542676eaae9b6e899c00f739bf012
7
+ data.tar.gz: ae46828ff6fc07333aada9131ac8e0e1af8680b5f624a0d3c95049f82c8e5e684bce7365d72ecee20a168392f9138516ad35e91a5d0e08b3cf3329ab4fa0dd8e
@@ -1,23 +1,23 @@
1
1
  module Matest
2
2
  class NoExceptionRaised < RuntimeError; end
3
3
  class UnexpectedExceptionRaised < RuntimeError; end
4
+ end
4
5
 
5
- def capture_exception(exception_class=nil, &block)
6
- expected_exception = exception_class || BasicObject
7
- begin
8
- block.call
9
- if exception_class
10
- raise Matest::NoExceptionRaised.new("Expected '#{exception_class.inspect}' from the block, but none was raised.")
11
- else
12
- raise Matest::NoExceptionRaised.new("Expected an Exception from the block, but none was raised.")
13
- end
14
- false
15
- rescue Matest::NoExceptionRaised => e
16
- raise e
17
- rescue expected_exception => e
18
- e
19
- rescue BasicObject => e
20
- raise e
6
+ def capture_exception(exception_class=nil, &block)
7
+ expected_exception = exception_class || BasicObject
8
+ begin
9
+ block.call
10
+ if exception_class
11
+ raise Matest::NoExceptionRaised.new("Expected '#{exception_class.inspect}' from the block, but none was raised.")
12
+ else
13
+ raise Matest::NoExceptionRaised.new("Expected an Exception from the block, but none was raised.")
21
14
  end
15
+ false
16
+ rescue Matest::NoExceptionRaised => e
17
+ raise e
18
+ rescue expected_exception => e
19
+ e
20
+ rescue BasicObject => e
21
+ raise e
22
22
  end
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.5.4"
2
+ VERSION = "1.5.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti