Sha256: dd618c6dc5928d585e73a5d6b889cbda7ac45ff614f5d39d58f703de1c7ba1d9

Contents?: true

Size: 380 Bytes

Versions: 1

Compression:

Stored size: 380 Bytes

Contents

require 'rails_helper'

RSpec.describe 'validate FactoryGirl factories' do
  FactoryGirl.factories.each do |factory|
    context "with factory for :#{factory.name}" do
      subject { FactoryGirl.build(factory.name) }

      it 'is valid' do
        is_valid = subject.valid?
        expect(is_valid).to be_true, subject.errors.full_messages.join(',')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bretels-1.1.0 templates/factories_spec.rb