Sha256: b2f1bbf8acc3ea04364cb6dd9c24b4598373e15f297b0a6363ce29a04ceab40e

Contents?: true

Size: 396 Bytes

Versions: 6

Compression:

Stored size: 396 Bytes

Contents

require 'faker'

FactoryGirl.define do
  factory :bookkeeper_purchase, :class => 'Bookkeeper::Purchase' do
    title { Faker::Name.title }
    description { Faker::Lorem.sentence }
    purchase_date "2013-02-15"
    warranty_duration 24
    receipt File.open(Rails.root.join('..', 'assets', 'images', 'receipt.jpg'))

    factory :bookkeeper_invalid_purchase do
      title nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bookkeeper-0.0.4 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.3 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.2 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.1 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.1.beta2 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.1.beta1 spec/factories/bookkeeper_purchases.rb