tengu 0.0.3 → 0.0.4

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: d124d7ab40773a1143eb66c8b7b051c53c485e84
4
- data.tar.gz: 4d475bee1504ad520e2907ecfdc2e6ce426effd5
3
+ metadata.gz: 3f7eb80850505454fb37a9be7be811e886d0a2cf
4
+ data.tar.gz: ceeb40d2fbbc61a7add948df5a6c2cb31dc13b2a
5
5
  SHA512:
6
- metadata.gz: 8e31ea456c5ab61d6276ad23dc35331e40759ed44b7eb3302b3290ca05e5b14944b7bae7db8b7cb3f3e38949184412f7d1fa7908bb8ccbeadb222185bd63f618
7
- data.tar.gz: 847853d24e172c0c64fddf4fabcc4c9adc7adb21d20cefd715d4241e8f6584e5e0472267285628ecd8e581d8f880e3ea6e91d8293c07f2b59a133dfb632b9a80
6
+ metadata.gz: c21847fc91f685900bea59f754c904ce62bce87f070d468796cf7f253260d39ab1bf27cc90a67eabb3a158d76d90bc12e51bea861e24db9491ca6c46a40b3b47
7
+ data.tar.gz: e24abcc8441dbb021578a74ff002e042aea88332ca80efc3296e31eb0bbfe0268a55d146296c9db1a3a0ba30f056bf8305035895e982f40dc9a9696fa9114cb2
@@ -15,16 +15,26 @@ module Tengu
15
15
  @success = true
16
16
  @pending = false
17
17
  @expectations = []
18
+ @error = nil
18
19
  end
19
20
 
20
21
  def run(listeners = [])
21
22
  @listeners = listeners
22
- instance_eval(&@block)
23
+ begin
24
+ instance_eval(&@block)
25
+ rescue Exception => e
26
+ @error = e
27
+ @success = false
28
+ end
23
29
  notify(@listeners)
24
30
  end
25
31
 
32
+ def errored?
33
+ @error
34
+ end
35
+
26
36
  def success?
27
- unless pending?
37
+ unless pending? || errored?
28
38
  @expectations.all? { |expectation| expectation.success? }
29
39
  end
30
40
  end
@@ -1,3 +1,3 @@
1
1
  module Tengu
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -13,6 +13,10 @@ describe "True" do
13
13
  pending
14
14
  end
15
15
 
16
+ it "fails examples with errors" do
17
+ raise
18
+ end
19
+
16
20
  xit "skips others" do
17
21
  expect($foo).to eq("bar")
18
22
  end
@@ -20,6 +20,10 @@ describe Tengu::ItBlock do
20
20
  end
21
21
 
22
22
  it "can define methods" do
23
+ pending
24
+ end
23
25
 
26
+ it "fails when error is thrown" do
27
+ pending
24
28
  end
25
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tengu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - halogenandtoast