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

Some tests fail with uninitialized constant Grape::Validations::Types::BigDecimal #2260

Closed
duffn opened this issue Jun 13, 2022 · 1 comment · Fixed by #2263
Closed

Some tests fail with uninitialized constant Grape::Validations::Types::BigDecimal #2260

duffn opened this issue Jun 13, 2022 · 1 comment · Fixed by #2263

Comments

@duffn
Copy link
Member

duffn commented Jun 13, 2022

Some test matrix combinations fail with the below error.

/opt/hostedtoolcache/Ruby/2.7.6/x64/bin/ruby -I/home/runner/work/grape/grape/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.11.0/lib:/home/runner/work/grape/grape/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.11.0/lib /home/runner/work/grape/grape/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.11.0/exe/rspec --pattern spec/\*\*/\*_spec.rb  --exclude-pattern spec/integration/\*\*/\*_spec.rb
An error occurred while loading spec_helper.
Failure/Error: BigDecimal,
NameError:
  uninitialized constant Grape::Validations::Types::BigDecimal
# ./lib/grape/validations/types.rb:25:in `<module:Types>'
# ./lib/grape/validations/types.rb:18:in `<module:Validations>'
# ./lib/grape/validations/types.rb:[7](https://github.com/duffn/grape/runs/6865569857?check_suite_focus=true#step:4:8):in `<module:Grape>'
# ./lib/grape/validations/types.rb:6:in `<top (required)>'
# ./lib/grape.rb:240:in `require'
# ./lib/grape.rb:240:in `<module:Validations>'
# ./lib/grape.rb:227:in `<module:Grape>'
# ./lib/grape.rb:30:in `<top (required)>'
# ./spec/spec_helper.rb:7:in `require'
# ./spec/spec_helper.rb:7:in `<top (required)>'
No examples found.
No examples found.
Finished in 0.00003 seconds (files took 0.7[25](https://github.com/duffn/grape/runs/6865569857?check_suite_focus=true#step:4:26)66 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
Finished in 0.00003 seconds (files took 0.72566 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
@dblock
Copy link
Member

dblock commented Jun 13, 2022

I think this is ruby/bigdecimal#127, or similar. Explicitly requiring bigdecimal seems to work, https://github.com/dblock/grape/actions/runs/2491398080.

#2263

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

Successfully merging a pull request may close this issue.

2 participants