sauce_rspec 1.0.5 → 1.0.6
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 +4 -4
- data/lib/sauce_rspec/rspec.rb +16 -17
- data/lib/sauce_rspec/version.rb +1 -1
- data/release_notes.md +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd54617858dc5c0c161f3a7fdd70aee1c532c42f
|
4
|
+
data.tar.gz: 6cdc8547676182eec9961620b297307b7ef728aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e5daf5e1a91ec208b6addfd052712f628c4b88ff36f008162d383bbc7ad3a255abef1f5efd00139279a1827813ff1ccfe3bb3ff38cff9deca58ad73290c8de5
|
7
|
+
data.tar.gz: 219e6ca79614b57959bb9e4f8d7d78bb85e6fe223304c10105adfd7dc86eca4040881d3922ed437437497bf2218c41ec25441a7e1863821e9dc014f6bf902e15
|
data/lib/sauce_rspec/rspec.rb
CHANGED
@@ -18,26 +18,25 @@ module RSpec
|
|
18
18
|
config = ::SauceRSpec.config
|
19
19
|
return rspec_register(example_group) unless config.sauce?
|
20
20
|
|
21
|
-
# must
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
21
|
+
# must iterate through descendants to handle nested describes
|
22
|
+
example_group.descendants.each do |desc_group|
|
23
|
+
new_examples = []
|
24
|
+
desc_group.examples.each do |ex|
|
25
|
+
# Use index to allow multiple duplicate caps to have unique ids
|
26
|
+
# ex: 1_firefox, 2_firefox
|
27
|
+
config.caps.each_with_index do |cap, index|
|
28
|
+
ex_with_cap = ex.clone
|
29
|
+
new_id = "#{ex_with_cap.id}_#{index}_#{cap}"
|
30
|
+
ex_with_cap.instance_variable_set(:@id, new_id)
|
31
|
+
# can *not* use metadata[:caps] because rspec will memoize the
|
32
|
+
# value and then reuse it for all the examples.
|
33
|
+
ex_with_cap.caps = cap
|
34
|
+
new_examples << ex_with_cap
|
35
|
+
end
|
36
36
|
end
|
37
|
+
desc_group.instance_variable_set(:@examples, new_examples)
|
37
38
|
end
|
38
39
|
|
39
|
-
example_group.instance_variable_set(:@examples, new_examples)
|
40
|
-
|
41
40
|
# invoke original register method
|
42
41
|
rspec_register(example_group)
|
43
42
|
end
|
data/lib/sauce_rspec/version.rb
CHANGED
data/release_notes.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
#### v1.0.6 2015-10-30
|
2
|
+
|
3
|
+
- [b87215b](https://github.com/bootstraponline/sauce_rspec/commit/b87215b545a12720c27795543cbb189fa236e06c) Release 1.0.6
|
4
|
+
- [5dad028](https://github.com/bootstraponline/sauce_rspec/commit/5dad028b4c7cf3208cc9f52caa5d40bfea059421) Fix nested describe support
|
5
|
+
|
6
|
+
|
1
7
|
#### v1.0.5 2015-10-30
|
2
8
|
|
3
9
|
- [4d29cdd](https://github.com/bootstraponline/sauce_rspec/commit/4d29cdda614ac93b259913f3ca3b75a7a427417d) Release 1.0.5
|