rox-client-rspec 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGQ4ZTQwZDMyM2M0NjI0M2VjMDU4MmZjYjMzOWZjY2FmZmYyMzhiZg==
4
+ ZTYyMTZjNjZlMDJiOGUxMTRiNjNjMjliNTRmNTc3ZTBlNTFlMmM5ZQ==
5
5
  data.tar.gz: !binary |-
6
- YmIyYjVlOGMyZDg2ZmUwYzk0YzJmOTkzMGFjZWRiY2FhMTRmNTdkOA==
6
+ YTFjMGZhNmE4ZjMyNDliMTMyOGRmZjRiOTY0ZmUwNTY5YzA5YTgzYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWZkOWQxMWMwMzFiNDhiNzE4MGRhNGRlNGQ5N2ZiYjQ4OTE1OTM5MmM5ZDg1
10
- ZDYyNTg3NzkzZTkxYWZkODU5NjAyMGE3ZDQ0YmM4MDQzZGUzYTgxMzA0ZmM0
11
- MDlhMmUxY2M0MTRiMGM3ZjNiN2JhZDhlNzc1Y2Y0MmZiYjM2ZWI=
9
+ ZTc3NDViMDRkNThiMTRkZGM5NjRkNDMxMmMyOTcxYjM3ZjExZDJhZTJiZTU2
10
+ YjZiZWMwZDQ5YTFhZDVlMDc4ZDQ5NTkzZGJjZjhjZTI1MmFmZDhkYjY4YmYz
11
+ ZDM1NTQ3YzA4Yzk0MTA1MTkzYjg5YmRjZTQ2MGE1MzMyMWQ0YzQ=
12
12
  data.tar.gz: !binary |-
13
- NmUzMGI0YmYwODk0NWJjNDJkNDMyNTcxMGVlODg1MjFmY2UxZWMyZjQ1M2Iy
14
- ZWJmMWFmMmEyMjFjZTM4ZjU5M2I1ZjJlZTU1ZjFlOGJmNDc4NDI4MDBlM2Fh
15
- OWViMGVkM2E3YzA3ZTdkMjQ3MDE2MGIxNzljMmZmMDFlYTI5NmQ=
13
+ MDMyNTc1NjI4YmQ4ZWI3MDBjNmJiOGJiYThmNjFkZDQ2YmEzMDY2NmMwN2Y5
14
+ NDQ5ODM1MTAwZDVkMWQwZWJkYjc1Y2JhMDJlYTUyMjQ0ZTg4ZjAzNDIyYTBl
15
+ NDQ1ZjVmMmMwNTA5N2ZlODYwYWM2NGI3OTExNzM2MWE1ZDMxYTg=
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Requirements
8
8
 
9
- * RSpec 3.1 (0.4.0+)
9
+ * RSpec 3.1 (0.4+)
10
10
  * *RSpec 2.14 is supported up to version 0.3.1*
11
11
 
12
12
  ## Installation
@@ -14,7 +14,7 @@
14
14
  In your Gemfile:
15
15
 
16
16
  ```rb
17
- gem 'rox-client-rspec', '~> 0.4.0'
17
+ gem 'rox-client-rspec', '~> 0.4.1'
18
18
  ```
19
19
 
20
20
  Manually:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -4,7 +4,7 @@ require 'rspec'
4
4
  module RoxClient
5
5
 
6
6
  module RSpec
7
- VERSION = '0.4.0'
7
+ VERSION = '0.4.1'
8
8
 
9
9
  class Error < StandardError; end
10
10
  class PayloadError < Error; end
@@ -36,11 +36,11 @@ module RoxClient::RSpec
36
36
  end
37
37
 
38
38
  def example_passed example_notification
39
- add_result example_notification.example, true
39
+ add_result example_notification, true
40
40
  end
41
41
 
42
42
  def example_failed example_notification
43
- add_result example_notification.example, false
43
+ add_result example_notification, false
44
44
  end
45
45
 
46
46
  def stop notification
@@ -55,30 +55,26 @@ module RoxClient::RSpec
55
55
 
56
56
  private
57
57
 
58
- def add_result example, successful
58
+ def add_result example_notification, successful
59
59
 
60
60
  options = {
61
61
  passed: successful,
62
62
  duration: ((Time.now - @current_time) * 1000).round
63
63
  }
64
- options[:message] = failure_message(example) unless successful
65
64
 
66
- @test_run.add_result example, @groups, options
65
+ options[:message] = failure_message example_notification unless successful
66
+
67
+ @test_run.add_result example_notification.example, @groups, options
67
68
  end
68
69
 
69
- def failure_message example
70
- exception = example.execution_result[:exception]
71
- Array.new.tap do |a|
72
- a << full_example_name(example)
73
- a << "Failure/Error: #{read_failed_line(exception, example).strip}"
74
- a << " #{exception.class.name}:" unless exception.class.name =~ /RSpec/
75
- exception.message.to_s.split("\n").each do |line|
76
- a << " #{line}"
77
- end
78
- format_backtrace(example.execution_result[:exception].backtrace, example).each do |backtrace_info|
79
- a << "# #{backtrace_info}"
80
- end
81
- end.join "\n"
70
+ def failure_message example_notification
71
+ String.new.tap do |m|
72
+ m << example_notification.description
73
+ m << "\n"
74
+ m << example_notification.message_lines.collect{ |l| " #{l}" }.join("\n")
75
+ m << "\n"
76
+ m << example_notification.formatted_backtrace.collect{ |l| " # #{l}" }.join("\n")
77
+ end
82
78
  end
83
79
 
84
80
  def full_example_name example
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rox-client-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Oulevay