Factories spec refactoring after #1616

This commit is contained in:
Valeriy Sizov 2012-10-03 13:33:31 +03:00
parent b5f9d29f55
commit dc22dd8ade

View file

@ -1,7 +1,9 @@
require 'spec_helper' require 'spec_helper'
INVALID_FACTORIES = [:key_with_a_space_in_the_middle]
FactoryGirl.factories.map(&:name).each do |factory_name| FactoryGirl.factories.map(&:name).each do |factory_name|
next if :key_with_a_space_in_the_middle == factory_name next if INVALID_FACTORIES.include?(factory_name)
describe "#{factory_name} factory" do describe "#{factory_name} factory" do
it 'should be valid' do it 'should be valid' do
build(factory_name).should be_valid build(factory_name).should be_valid