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 +8 -8
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/rox-client-rspec.rb +1 -1
- data/lib/rox-client-rspec/formatter.rb +14 -18
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTYyMTZjNjZlMDJiOGUxMTRiNjNjMjliNTRmNTc3ZTBlNTFlMmM5ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTFjMGZhNmE4ZjMyNDliMTMyOGRmZjRiOTY0ZmUwNTY5YzA5YTgzYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTc3NDViMDRkNThiMTRkZGM5NjRkNDMxMmMyOTcxYjM3ZjExZDJhZTJiZTU2
|
10
|
+
YjZiZWMwZDQ5YTFhZDVlMDc4ZDQ5NTkzZGJjZjhjZTI1MmFmZDhkYjY4YmYz
|
11
|
+
ZDM1NTQ3YzA4Yzk0MTA1MTkzYjg5YmRjZTQ2MGE1MzMyMWQ0YzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
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.
|
17
|
+
gem 'rox-client-rspec', '~> 0.4.1'
|
18
18
|
```
|
19
19
|
|
20
20
|
Manually:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/lib/rox-client-rspec.rb
CHANGED
@@ -36,11 +36,11 @@ module RoxClient::RSpec
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def example_passed example_notification
|
39
|
-
add_result example_notification
|
39
|
+
add_result example_notification, true
|
40
40
|
end
|
41
41
|
|
42
42
|
def example_failed example_notification
|
43
|
-
add_result example_notification
|
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
|
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
|
-
|
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
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
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
|