cadre 1.0.2 → 1.0.3

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: aaf923c93fa131834c438bc9090df5e86d61a611
4
- data.tar.gz: f010f0c49e64d97504f162b0ca38a88c528a0573
3
+ metadata.gz: 3f4c126678b0df624a7a2edb7ba95d3ca11608ed
4
+ data.tar.gz: 0e00cd37b4539461657c755b0a9dc357ba1784b9
5
5
  SHA512:
6
- metadata.gz: f0522cc78c32262c101a729285f44009c13d719343f8295e301f7ea8cefcf131d16e6752a68f441ef7848bc3b59842464e8f10bcca6c1212a54c0b2ef2628ef4
7
- data.tar.gz: d0cfe3b6fc7357d18c94bb81166170a8e9a822a0592a827f687dd7d4cfa7dc937ef6b80a02252d21e82fdd5ad6d67fbd765e1e1cfc4c7345c77addd10e550b7e
6
+ metadata.gz: a5bd775769138681ec003fedce849fadc1509f15f43749251a1f298a1703c8174a485a9822391b5aaa284910d5552cc6d97750d2104e84dda90bbbfc82c58cf4
7
+ data.tar.gz: d88f2ab5d1dcef55f0ddddaa022c4dd5fdba76be6420c1847932196554e568819a48e565f95d02bdc6ef6a6850366acfd942fb46c1ab68f592ed4898a4c0b6b8
@@ -15,19 +15,22 @@ module Cadre
15
15
  end
16
16
  attr_reader :output, :config
17
17
 
18
- ::RSpec::Core::Formatters.register self, :example_failed, :example_pending
18
+ ::RSpec::Core::Formatters.register self, :example_failed, :example_pending, :stop
19
19
 
20
20
  def example_failed(notification)
21
21
  example = notification.example
22
22
 
23
23
  exception = example.execution_result.exception
24
- paths = exception.backtrace.map do |frame|
25
- format_caller frame
26
- end.compact
27
- paths = paths[0..config.backtrace_limit]
28
- message = "#{example.full_description}: #{format_message exception.message}"
29
- paths.each do |path|
30
- output.puts "#{path}: [FAIL] #{message}"
24
+ exceptions = exception.respond_to?(:all_exceptions) ? exception.all_exceptions : [exception]
25
+ exceptions.each do |exception|
26
+ paths = exception.backtrace.map do |frame|
27
+ format_caller frame
28
+ end.compact[0..config.backtrace_limit]
29
+
30
+ message = "#{example.full_description}: #{format_message exception.message}"
31
+ paths.each do |path|
32
+ output.puts "#{path}: [FAIL] #{message}"
33
+ end
31
34
  end
32
35
  end
33
36
 
@@ -47,6 +50,10 @@ module Cadre
47
50
  @pending_count = pending_count
48
51
  end
49
52
 
53
+ def stop(notification)
54
+ @output.close
55
+ end
56
+
50
57
  private
51
58
 
52
59
  def format_caller(caller_info)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadre
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-13 00:00:00.000000000 Z
11
+ date: 2016-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -111,7 +111,7 @@ rdoc_options:
111
111
  - --main
112
112
  - doc/README
113
113
  - --title
114
- - cadre-1.0.2 Documentation
114
+ - cadre-1.0.3 Documentation
115
115
  require_paths:
116
116
  - lib/
117
117
  required_ruby_version: !ruby/object:Gem::Requirement