Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests do not run locally #1292

Closed
modohash opened this issue Nov 8, 2024 · 2 comments
Closed

Unit tests do not run locally #1292

modohash opened this issue Nov 8, 2024 · 2 comments

Comments

@modohash
Copy link

modohash commented Nov 8, 2024

When trying to run the unit tests for the project locally, no matter how many versions I go back, they always fail with the error:

`An error occurred while loading spec_helper.
Failure/Error: require 'webmock/rspec'

NameError:
uninitialized constant CookieJar::CookieValidation::PATTERN::IPV4ADDR
/usr/local/bundle/gems/cookiejar-0.3.4/lib/cookiejar/cookie_validation.rb:32:in <module:PATTERN>' /usr/local/bundle/gems/cookiejar-0.3.4/lib/cookiejar/cookie_validation.rb:27:in module:CookieValidation'
/usr/local/bundle/gems/cookiejar-0.3.4/lib/cookiejar/cookie_validation.rb:25:in <module:CookieJar>' /usr/local/bundle/gems/cookiejar-0.3.4/lib/cookiejar/cookie_validation.rb:5:in <top (required)>'
/usr/local/bundle/gems/cookiejar-0.3.4/lib/cookiejar/cookie.rb:3:in <top (required)>' /usr/local/bundle/gems/cookiejar-0.3.4/lib/cookiejar.rb:1:in <top (required)>'
/usr/local/bundle/gems/em-http-request-1.1.7/lib/em-http/client.rb:1:in <top (required)>' /usr/local/bundle/gems/em-http-request-1.1.7/lib/em-http.rb:17:in <top (required)>'
/usr/local/bundle/gems/em-http-request-1.1.7/lib/em-http-request.rb:1:in <top (required)>' /usr/local/bundle/gems/webmock-3.24.0/lib/webmock/http_lib_adapters/em_http_request_adapter.rb:6:in <top (required)>'
/usr/local/bundle/gems/webmock-3.24.0/lib/webmock.rb:55:in require_relative' /usr/local/bundle/gems/webmock-3.24.0/lib/webmock.rb:55:in <top (required)>'
/usr/local/bundle/gems/webmock-3.24.0/lib/webmock/rspec.rb:3:in <top (required)>' ./spec/spec_helper.rb:8:in <top (required)>'
Run options: exclude {:skip=>true}
`

Looking at the automated build for the project it also fails with the same error. Is there some other way to run the tests locally or some fix that can be applied? Not having the unit tests running seems like it would inhibit contributions.

Any help would be appreciated.

@jordan-brough
Copy link

jordan-brough commented Nov 12, 2024

This is from this issue: ruby/uri#131

A workaround is to limit the uri gem version in your app.
E.g. in a Gemfile:

gem "uri", "~> 0.13"

@modohash
Copy link
Author

@jordan-brough Great, thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants