integration-tests-rails 1.1.2 → 1.1.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
  SHA256:
3
- metadata.gz: 8d0f4c5aac87998a36e8c05f73d976f4ca20b3e782c15de1774a313fe5910dab
4
- data.tar.gz: cc3be55a934b98c6a0ce9e636b46ec51f330c754fa2b4b1f0b81fcb2f3dbfafe
3
+ metadata.gz: 384f4f3272d0ff29fee4b9a2d6bc580eec97967dcfaa195735c24dc147d56a01
4
+ data.tar.gz: 8748fcb21a1a74c012254bc9cc1f219c3cf43ab1dfcf5051965e000f7d1893ea
5
5
  SHA512:
6
- metadata.gz: '01837084f1a0c65d194c6ff3ddd303478319e7e043d3bd4a9fb378b0b9ede402570397ee855f321741d005d458bb411f4ce5913f0bd815f1ac395bb6d4a683e4'
7
- data.tar.gz: bd5fe9d65e56eff6717a961e49028548fc2eb400622512af4902ae7cbead76a9eb9c1ff557977b381bd69abee263e6c0e41d60d8b8f71c7e03a29d7269823f20
6
+ metadata.gz: 9e97a327ac819b6fd3155ea5366e959119a25305e6f5db0dbf994bfeaf1be26b621f6d22d5987708f272bca15672a9c9f0e13efdde1c41590c5af3724ca07f05
7
+ data.tar.gz: 99848ce892f5abc64e4282d02f2e360e370e2b1c0495e2d470aed7882a6b0bf0b60aea227e0cc9a24577be30c9bfb224730e37329f1be828443d6c456a5ce9b5
@@ -8,7 +8,7 @@ module IntegrationTestsRails
8
8
  config = IntegrationTestsRails.configuration
9
9
  attempts ||= config.retry_attempts
10
10
  sleep_duration ||= config.retry_sleep_duration
11
- capture_exceptions ||= config.retry_capture_exceptions
11
+ capture_exceptions ||= constantize_exceptions(config)
12
12
  counter = 0
13
13
 
14
14
  begin
@@ -22,6 +22,12 @@ module IntegrationTestsRails
22
22
  retry
23
23
  end
24
24
  end
25
+
26
+ private
27
+
28
+ def constantize_exceptions(config)
29
+ config.retry_capture_exceptions.filter_map { |e| e.constantize if e.is_a?(String) }
30
+ end
25
31
  end
26
32
  end
27
33
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'helpers'
4
+ require_relative 'dsl'
4
5
  require_relative 'tests_controller'
5
6
 
6
7
  module IntegrationTestsRails
@@ -52,7 +52,7 @@ module IntegrationTestsRails
52
52
  @puma_threads = '1:1'
53
53
  @remote = false
54
54
  @retry_attempts = 1
55
- @retry_capture_exceptions = [RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound]
55
+ @retry_capture_exceptions = ['RSpec::Expectations::ExpectationNotMetError', 'Capybara::ElementNotFound']
56
56
  @retry_sleep_duration = 0
57
57
  @server_host = '0.0.0.0' # rubocop:disable Style/IpAddresses
58
58
  @server_port = nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IntegrationTestsRails
4
- VERSION = '1.1.2'
4
+ VERSION = '1.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: integration-tests-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tien