From cd99fa8cebc6efa059b4fca743d517c88f8d9686 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sat, 4 Mar 2023 11:12:09 -0500 Subject: Fabricator specs (#23925) --- spec/fabricators_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spec/fabricators_spec.rb (limited to 'spec/fabricators_spec.rb') diff --git a/spec/fabricators_spec.rb b/spec/fabricators_spec.rb new file mode 100644 index 000000000..3b76c56ce --- /dev/null +++ b/spec/fabricators_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' + +Fabrication.manager.load_definitions if Fabrication.manager.empty? + +Fabrication.manager.schematics.map(&:first).each do |factory_name| + describe "The #{factory_name} factory" do + it 'is valid' do + factory = Fabricate(factory_name) + expect(factory).to be_valid + end + end +end -- cgit