Skip to content

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real fake data. Allows creation of an entire schema of fake data that honors associations.

  • script/generate imposter => /test/imposter/[timestamp]_[model].yaml #YAML DSLs for the fake data generation

# YAMLs are executed in series order much like migrations

  • rake::imposter IMPOSTER=“products” #generate only the /test/fixtures/products.csv

  • rake::imposter #generate all /test/imposter/[##############_]*.yaml to /test/fixtures

  • rake::imposter –force #generate all /test/imposter/[###]-*.yaml to /test/fixtures to

  • overwrite any existing .csv

  • Imposter::Noun.noun => “apple” #random noun

  • Imposter::Verb.verbs(3) => “run tag jump” #random verbs string space delimited

#—For unit/integration/etl testing that require real but random addresses

  • Imposter::CSZ.zip => “90210” #random real postal code

  • Imposter::CSZ.city(:zip=>“90210”) => “Beverly Hills” #real city name from zip

  • Imposter::CSZ.state_abbr(:zip=>“90210”) => “CA” #real 2 letter state abbreviation upper case

  • Imposter::CSZ.state_name(:zip=>“90210”) => “California” #Real State name Camelized

  • Imposter::CSZ.zip(:state_abbr=>“CA”) => “90115” #Random but real postal code from real state.

About

Generator, rake and YAML imposters for schema level data faking

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages