sauce_rspec 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3afb3d1c2036f8fb56bce7b4f759a0fb78cb24e0
4
- data.tar.gz: 3976190b5598a1c481900ebad776174a0aab807e
3
+ metadata.gz: cd54617858dc5c0c161f3a7fdd70aee1c532c42f
4
+ data.tar.gz: 6cdc8547676182eec9961620b297307b7ef728aa
5
5
  SHA512:
6
- metadata.gz: 76a5798bd73f9e8bec2332514809567b7321cfd02db366065df4672fb015d8abfc18b8402a0e0008794ba72470fccb7b29442cfc456f59c126213536105a258e
7
- data.tar.gz: bb9734eb79836516d32ef471e2f0aaccab5c855d9dda1404fe02f41f04233b85f0c331d5abdb5cf944c53619857340e3f06c667a254debd75760394d8d4a7167
6
+ metadata.gz: 2e5daf5e1a91ec208b6addfd052712f628c4b88ff36f008162d383bbc7ad3a255abef1f5efd00139279a1827813ff1ccfe3bb3ff38cff9deca58ad73290c8de5
7
+ data.tar.gz: 219e6ca79614b57959bb9e4f8d7d78bb85e6fe223304c10105adfd7dc86eca4040881d3922ed437437497bf2218c41ec25441a7e1863821e9dc014f6bf902e15
@@ -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 use `descendant_filtered_examples` to ensure all examples
22
- # including those from nested example groups are included.
23
- examples = example_group.descendant_filtered_examples
24
- new_examples = []
25
- examples.each do |ex|
26
- # Use index to allow multiple duplicate caps to have unique ids
27
- # ex: 1_firefox, 2_firefox
28
- config.caps.each_with_index do |cap, index|
29
- ex_with_cap = ex.clone
30
- new_id = "#{ex_with_cap.id}_#{index}_#{cap}"
31
- ex_with_cap.instance_variable_set(:@id, new_id)
32
- # can *not* use metadata[:caps] because rspec will memoize the
33
- # value and then reuse it for all the examples.
34
- ex_with_cap.caps = cap
35
- new_examples << ex_with_cap
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
@@ -1,4 +1,4 @@
1
1
  module SauceRSpec
2
- VERSION = '1.0.5' unless defined? ::SauceRSpec::VERSION
2
+ VERSION = '1.0.6' unless defined? ::SauceRSpec::VERSION
3
3
  DATE = '2015-10-30' unless defined? ::SauceRSpec::DATE
4
4
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce_rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com