Releases: nepalez/fixturama
Releases · nepalez/fixturama
Add objects counter to seed fixtures
Use the :count
key to create several objects at once:
---
- type: user
count: 2
trait:
- customer
It is set to 1 by default.
You can assign it either zero or negative value with the same effect: no objects will be created. This can be useful for seed parameterization.
---
- type: user
count: <%= count %>
trait:
- customer
Configure starting ids of database tables
# /spec/rails_helper.rb
RSpec.configure do |config|
config.before(:suite) { Fixturama.start_ids_from 1_000_000 }
end
Support stubbing by arguments
---
- class: Balance
chain: debet
arguments: 0
actions:
- return: 1
- class: Balance
chain: debet
arguments: 1
actions:
- return: 0
- raise: UnsifficientFunds
- class: Balance
chain: debet
arguments: 2
actions:
- raise: UnsifficientFunds
The first public release
Contains features extracted from the production app, namely the helpers:
load_fixture
stub_fixture
seed_fixture