Sha256: 6b74401e7b89e957f8bbe3820cfba8c2beeaa12223a2acfc11f8729e173d6d21
Contents?: true
Size: 531 Bytes
Versions: 40
Compression:
Stored size: 531 Bytes
Contents
require 'rails_helper' require 'sorbet-rails/utils' RSpec.describe SorbetRails::Utils do it 'loads all the models in the app' do expected_models = [ Potion, SpellBook, Wand, Wizard, ] if Object.const_defined?('ActiveStorage') expected_models += [ ActiveStorage::Attachment, ActiveStorage::Blob, ] end SorbetRails::Utils.rails_eager_load_all! all_models = ActiveRecord::Base.descendants expect((expected_models - all_models)).to eql([]) end end
Version data entries
40 entries across 40 versions & 1 rubygems