summaryrefslogtreecommitdiff
path: root/spec/factories_spec.rb
blob: c8e218d4d037459977b7dcd4616bd1909dc24c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

INVALID_FACTORIES = [
  :key_with_a_space_in_the_middle,
  :invalid_key,
]

FactoryGirl.factories.map(&:name).each do |factory_name|
  next if INVALID_FACTORIES.include?(factory_name)
  describe "#{factory_name} factory" do
    it 'should be valid' do
      expect(build(factory_name)).to be_valid
    end
  end
end