gitlab-org--gitlab-foss/spec/factories_spec.rb

16 lines
339 B
Ruby
Raw Normal View History

require 'spec_helper'
INVALID_FACTORIES = [
:key_with_a_space_in_the_middle,
:invalid_key,
]
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
build(factory_name).should be_valid
end
end
end