Sha256: 7163602f6c46134b5c167bc1e8cd7d49c392b0d4c3fa0da45f7d20fc86ef455b

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 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'))
    amount 100

    factory :bookkeeper_invalid_purchase do
      title nil
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bookkeeper-0.0.7 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.6 spec/factories/bookkeeper_purchases.rb
bookkeeper-0.0.5 spec/factories/bookkeeper_purchases.rb