Sha256: bd29525ef51f6f7a6bcf638c50e5810faaeb4f8f151098990bcb2667a14567f1

Contents?: true

Size: 451 Bytes

Versions: 2

Compression:

Stored size: 451 Bytes

Contents

require 'spec_helper'

FactoryGirl.factories.map(&:name).each do |factory_name|
  describe "The #{factory_name} factory" do
    if factory_name.to_s.start_with? "base_" then
      # skip
    elsif factory_name.to_s.start_with? "bad_" then
      it 'is NOT valid' do
        FactoryGirl.build(factory_name).should_not be_valid
      end
    else
      it 'is valid' do
        FactoryGirl.build(factory_name).should be_valid
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gringotts-0.6.7 spec/factories_spec.rb
gringotts-0.6.5 spec/factories_spec.rb