Commit 722585a9 authored by Nick Thomas's avatar Nick Thomas

Fix a spec failure caused by extra factories in EE

parent 0a6041d6
...@@ -8,12 +8,16 @@ describe 'factories' do ...@@ -8,12 +8,16 @@ describe 'factories' do
end end
it 'does not raise error when created' do it 'does not raise error when created' do
skip("#{factory.name} cannot be saved") unless build(factory.name).respond_to?(:save!)
expect { create(factory.name) }.not_to raise_error expect { create(factory.name) }.not_to raise_error
end end
factory.definition.defined_traits.map(&:name).each do |trait_name| factory.definition.defined_traits.map(&:name).each do |trait_name|
describe "linting #{trait_name} trait" do describe "linting #{trait_name} trait" do
skip 'does not raise error when created' do skip 'does not raise error when created' do
skip("#{factory.name} cannot be saved") unless build(factory.name).respond_to?(:save!)
expect { create(factory.name, trait_name) }.not_to raise_error expect { create(factory.name, trait_name) }.not_to raise_error
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment