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