2012-08-28 01:42:28 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2013-02-15 04:31:05 -05:00
|
|
|
INVALID_FACTORIES = [
|
2013-07-16 17:14:03 -04:00
|
|
|
:key_with_a_space_in_the_middle,
|
|
|
|
:invalid_key,
|
2013-02-15 04:31:05 -05:00
|
|
|
]
|
2012-10-03 06:33:31 -04:00
|
|
|
|
2012-09-06 10:52:01 -04:00
|
|
|
FactoryGirl.factories.map(&:name).each do |factory_name|
|
2012-10-03 06:33:31 -04:00
|
|
|
next if INVALID_FACTORIES.include?(factory_name)
|
2012-09-06 10:52:01 -04:00
|
|
|
describe "#{factory_name} factory" do
|
|
|
|
it 'should be valid' do
|
2015-02-12 13:17:35 -05:00
|
|
|
expect(build(factory_name)).to be_valid
|
2012-08-28 01:42:28 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|