Closed bioform closed 1 year ago
Hi @bioform, I chatted with the team. Evidently, spec/support
is a custom concept that is made “conventional” because rspec-rails
adds the code snippet for you in rails_helper.rb
, but there’s nothing baked into rspec itself. Therefore, you have to do this yourself (which is what we do at Gusto):
Dir[Rails.root.join('packs/*/spec/support/**/*.rb')].sort.each { |f| require f }
@bioform Going to close this for now – please let me know if you have any questions/concerns/feedback and we can reopen this.
If you try to put any spec shared example file to the
spec/support/shared_examples/
pack-related folder, it will be unavailable for package-related specs. The resulting error looks like this: