简体   繁体   中英

Where to put test files that get created. Ruby directory structure

Say I'm writing an integration test that reads in a CSV and outputs a CSV with some changes in the data. Where do I put this test file in a Ruby project? Is there some convention for where temporary files that get created in tests go that eventually get torn down or delete?

Say my project structure is simple:

--root
   --app
     --promotions
   --spec
   Gemfile
   Gemfile.lock

听起来像Dir.mktmpdir的理想人选。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM