Sha256: c7bdc8c429eff4a54b34ae7f6ef3dc20e9a7bd119454dabd0a8351a8e07ba039
Contents?: true
Size: 426 Bytes
Versions: 1
Compression:
Stored size: 426 Bytes
Contents
# frozen_string_literal: true require_relative "all_records_validator/version" module RSpec module AllRecordsValidator def self.validate!(ignored_models: []) target_classes = ApplicationRecord.subclasses.reject {|klass| klass.abstract_class? || ignored_models.include?(klass) } target_classes.each do |klass| klass.all.each do |obj| obj.validate! end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-all_records_validator-0.0.7 | lib/rspec/all_records_validator.rb |