sauce_rspec 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 +4 -4
- data/README.md +1 -1
- data/lib/sauce_rspec/sauce_rspec.rb +20 -16
- data/lib/sauce_rspec/version.rb +2 -2
- data/release_notes.md +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef1c5fd131dcb32b1943feb8c42f343ac3dba102
|
4
|
+
data.tar.gz: b39de1e80669bd91de755554a62c3f7a31ff6df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e15a0c9389f1f923f728a964a8fdc0cad5c676ac8b7e25a0ce97918aff1af5616055648af5de4628234bbd2e6c0fb9dbc31f95ab006e8258568c74b474e70d
|
7
|
+
data.tar.gz: ae1f62398c52743d4e98fa96545811f0655404056455243ec08facfab6a41d77d009ef7902e553c4dbbe25e22fe22949560ea7173a105af89ad0170d20bcaa0a
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/bootstraponline/sauce_rspec.svg)](https://travis-ci.org/bootstraponline/sauce_rspec/builds)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/sauce_rspec.svg)](https://rubygems.org/gems/sauce_rspec)
|
5
|
-
[![Coverage Status](https://coveralls.io/repos/bootstraponline/sauce_rspec/badge.svg?branch=master&service=github&nocache=
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/bootstraponline/sauce_rspec/badge.svg?branch=master&service=github&nocache=1)](https://coveralls.io/github/bootstraponline/sauce_rspec?branch=master)
|
6
6
|
|
7
7
|
A new [Ruby gem](https://github.com/bootstraponline/meta/wiki/Sauce_Ruby_Integration_Roadmap) for using RSpec on Sauce.
|
8
8
|
|
@@ -11,13 +11,14 @@ module SauceRSpec
|
|
11
11
|
# Fully initialized Selenium Webdriver.
|
12
12
|
def driver= driver
|
13
13
|
fail 'Driver must not be nil' unless driver
|
14
|
-
@driver
|
14
|
+
@driver = driver
|
15
15
|
|
16
16
|
# Attach session_id to the current RSpec example.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
sauce_test_link = "https://saucelabs.com/beta/tests/#{driver.session_id}"
|
18
|
+
metadata = RSpec.current_example.metadata
|
19
|
+
metadata[:sauce_test_link] = sauce_test_link
|
20
|
+
# don't attach sauce link to description because it messes up formatters
|
21
|
+
# the formatters don't expect a link in the test name.
|
21
22
|
end
|
22
23
|
|
23
24
|
def run_after_test_hooks timeout: 60, stdout: $stdout
|
@@ -28,18 +29,19 @@ module SauceRSpec
|
|
28
29
|
# Returns the caps for the current RSpec example with the Sauce Labs
|
29
30
|
# job name set.
|
30
31
|
def update_example_caps
|
31
|
-
example
|
32
|
-
meta
|
32
|
+
example = RSpec.current_example
|
33
|
+
meta = example.metadata
|
33
34
|
|
35
|
+
# Must update the test description / full_description because we are
|
36
|
+
# duplicating the tests and the only difference is the capabilities.
|
37
|
+
#
|
34
38
|
# Store a copy of the original description if it's not already saved.
|
35
|
-
unless meta[:
|
36
|
-
|
37
|
-
meta[:old_full_description] = example.full_description
|
38
|
-
end
|
39
|
+
meta[:old_description] = example.description unless meta[:old_description]
|
40
|
+
meta[:old_full_description] = example.full_description unless meta[:old_full_description]
|
39
41
|
|
40
42
|
# Reset the description to ensure previous runs don't mess with the value
|
41
|
-
meta[:description]
|
42
|
-
meta[:full_description]
|
43
|
+
meta[:description] = meta[:old_description]
|
44
|
+
meta[:full_description] = meta[:old_full_description]
|
43
45
|
|
44
46
|
caps = example.caps
|
45
47
|
full_description = example.full_description
|
@@ -52,9 +54,11 @@ module SauceRSpec
|
|
52
54
|
browser_version_platform = [browser, version, '-', platform].join ' '
|
53
55
|
caps[:name] = [full_description, '-', browser_version_platform].join ' '
|
54
56
|
|
55
|
-
# Add browser info to
|
56
|
-
|
57
|
-
|
57
|
+
# Add browser info to description to ensure test names are unique
|
58
|
+
# Otherwise the same test run on multiple browsers will not have a different name
|
59
|
+
extra_description = " - #{browser_version_platform}"
|
60
|
+
meta[:full_description] += extra_description
|
61
|
+
meta[:description] += extra_description
|
58
62
|
|
59
63
|
caps
|
60
64
|
end
|
data/lib/sauce_rspec/version.rb
CHANGED
data/release_notes.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
#### v1.0.3 2015-10-16
|
2
|
+
|
3
|
+
- [1529f39](https://github.com/bootstraponline/sauce_rspec/commit/1529f396f11f73b3a63f921492fd0382867b5a70) Release 1.0.3
|
4
|
+
- [85c0506](https://github.com/bootstraponline/sauce_rspec/commit/85c050650b8203c0f5e7ec3dd4eed341007cde66) Add sauce_test_link to example.metadata
|
5
|
+
- [f77dcc0](https://github.com/bootstraponline/sauce_rspec/commit/f77dcc011852a4310a56a181b27540a534760ade) Add comment about description modification
|
6
|
+
- [d7a0f56](https://github.com/bootstraponline/sauce_rspec/commit/d7a0f56eb7427c52647dd7088b64a84d402208f9) Remove job link from example description
|
7
|
+
|
8
|
+
|
1
9
|
#### v1.0.2 2015-10-12
|
2
10
|
|
3
11
|
- [21b3df0](https://github.com/bootstraponline/sauce_rspec/commit/21b3df0b6042fc93a2426522213b0bfdd4902db7) Release 1.0.2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sauce_rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|