skryukov / skooma

Skooma is a Ruby library for validating API implementations against OpenAPI documents.
MIT License
140 stars 5 forks source link

Warning to add the minitest gem when running with eager_load enabled #27

Closed mateusodd closed 3 months ago

mateusodd commented 3 months ago

We are receiving this alert when running with eager load enabled:

=> Booting Puma
=> Rails 7.1.3.4 application starting in development 
=> Run `bin/rails server --help` for more startup options
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
  /usr/local/rvm/gems/default/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
  /usr/local/rvm/gems/default/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:34:in `require'
  /usr/local/rvm/gems/default/gems/skooma-0.3.1/lib/skooma/minitest.rb:3:in `<main>'
  /usr/local/rvm/gems/default/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
  /usr/local/rvm/gems/default/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:26:in `require'
  /usr/local/rvm/gems/default/gems/zeitwerk-2.6.16/lib/zeitwerk/cref.rb:91:in `const_get'
  /usr/local/rvm/gems/default/gems/zeitwerk-2.6.16/lib/zeitwerk/cref.rb:91:in `get'

Should it be included in the Gemfile of the gem?

skryukov commented 3 months ago

Hey, thanks for the issue report ❤️

I removed test helpers from eager loading. The fix is already available in Skooma v0.3.2.