NoRedInk / rspec-retry

retry randomly failing rspec example
MIT License
584 stars 94 forks source link

NameError: uninitialized constant Net Did you mean? Set #79

Closed uscengineer closed 5 years ago

uscengineer commented 7 years ago

rspec-retry 0.5.4 ruby 2.3.0 rspec 3.6.0

This is my configuration:

RSpec.configure do |config|
  config.verbose_retry = true
  config.display_try_failure_messages = true
  config.clear_lets_on_failure = true
  config.default_retry_count = 2
  config.exceptions_to_retry = [Net::ReadTimeout]

I am getting the following error:

Failure/Error: config.exceptions_to_retry = [Net::ReadTimeout]

NameError:
  uninitialized constant Net
  Did you mean?  Set

Any idea why this error is thrown? If I require 'net/http' it does not throw that error buty it will not retry when the exception I am looking for is thrown.

michaelglass commented 6 years ago

I'm sorry, I'm not sure, I would advise you to require 'net/http' but I don't know why it won't retry. Can you write a minimal test case?