BigW Consortium Gitlab

factories_spec.rb 335 Bytes
Newer Older
1 2
require 'spec_helper'

3
INVALID_FACTORIES = [
4 5
  :key_with_a_space_in_the_middle,
  :invalid_key,
6
]
7

Nihad Abbasov committed
8
FactoryGirl.factories.map(&:name).each do |factory_name|
9
  next if INVALID_FACTORIES.include?(factory_name)
Nihad Abbasov committed
10 11 12
  describe "#{factory_name} factory" do
    it 'should be valid' do
      build(factory_name).should be_valid
13 14 15
    end
  end
end