Module: Synthra::TestHelpers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/synthra/engine.rb
Overview
Test helpers for RSpec and Minitest
Instance Method Summary collapse
-
#fake_data(schema_name, **options) ⇒ Hash
Generate fake data for a schema.
-
#fake_data_list(schema_name, count = 10, **options) ⇒ Array<Hash>
Generate multiple fake data records.
Instance Method Details
#fake_data(schema_name, **options) ⇒ Hash
Generate fake data for a schema
222 223 224 |
# File 'lib/synthra/engine.rb', line 222 def fake_data(schema_name, **) Synthra.generate(schema_name.to_s, **) end |
#fake_data_list(schema_name, count = 10, **options) ⇒ Array<Hash>
Generate multiple fake data records
233 234 235 |
# File 'lib/synthra/engine.rb', line 233 def fake_data_list(schema_name, count = 10, **) Synthra.generate_many(schema_name.to_s, count, **) end |