Sha256: a65b215d20111fb84c320c7e296aba7e127bd9bc441009c750480bfc692dfb42

Contents?: true

Size: 493 Bytes

Versions: 3

Compression:

Stored size: 493 Bytes

Contents

require 'faker'

FactoryGirl.define do
  factory :bookkeeper_movement, :class => 'Bookkeeper::Movement' do
    association :account, factory: :bookkeeper_account
    amount Random.rand(-200..200)
    description { Faker::Lorem.sentence }

    factory :bookkeeper_positive_movement do
      amount Random.rand(1..200)
    end

    factory :bookkeeper_negative_movement do
      amount Random.rand(-200..-1)
    end

    factory :bookkeeper_invalid_movement do
      amount 0
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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