sauce_rspec 1.0.2 → 1.0.3

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7d1ebc7fdc156c5ea51d76d7f8526fd298e2a38
4
- data.tar.gz: 9dd34789cebaf4884e7b3e02374b42e568a987d6
3
+ metadata.gz: ef1c5fd131dcb32b1943feb8c42f343ac3dba102
4
+ data.tar.gz: b39de1e80669bd91de755554a62c3f7a31ff6df6
5
5
  SHA512:
6
- metadata.gz: 5f58071d081f0afa8851721a5e4b68b7838024493b70640036d5da04d1668d4c62a35440265786d93420334e48980e428b3165fe8ab4f7aa93fe81d41c6e430a
7
- data.tar.gz: 59a6c65ccd5218416238a4d61bbc1c3e2758f6ce097e400feb4794eadeabef2285f96e471a35c5d2498627c5b5a27a87807579659da074b255dab11cb42838ba
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=true)](https://coveralls.io/github/bootstraponline/sauce_rspec?branch=master)
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 = driver
14
+ @driver = driver
15
15
 
16
16
  # Attach session_id to the current RSpec example.
17
- example = RSpec.current_example
18
- session_id = driver.session_id
19
- example.metadata[:session_id] = session_id
20
- example.metadata[:full_description] += " - https://saucelabs.com/beta/tests/#{session_id}"
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 = RSpec.current_example
32
- meta = example.metadata
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[:old_full_description]
36
- meta[:old_description] = example.description
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] = meta[:old_description]
42
- meta[:full_description] = meta[:old_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 full description for RSpec progress reporter.
56
- meta[:full_description] += "\n#{' ' * 5 + browser_version_platform}"
57
- meta[:description] += " - #{browser_version_platform}"
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
@@ -1,4 +1,4 @@
1
1
  module SauceRSpec
2
- VERSION = '1.0.2' unless defined? ::SauceRSpec::VERSION
3
- DATE = '2015-10-12' unless defined? ::SauceRSpec::DATE
2
+ VERSION = '1.0.3' unless defined? ::SauceRSpec::VERSION
3
+ DATE = '2015-10-16' unless defined? ::SauceRSpec::DATE
4
4
  end
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.2
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-12 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec