blob: 786e1456f5fa7ecb2011cd551c218aace350e939 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
require 'spec_helper'
describe 'factories' do
FactoryGirl.factories.each do |factory|
describe "#{factory.name} factory" do
let(:entity) { build(factory.name) }
it 'does not raise error when created' do
expect { entity }.not_to raise_error
end
it 'is valid', if: factory.build_class < ActiveRecord::Base do
expect(entity).to be_valid
end
end
end
end
|