Jwan622
Jwan622

Reputation: 11659

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

Upvotes: 0

Views: 54

Answers (1)

Amadan
Amadan

Reputation: 198446

Sounds like a perfect candidate for Dir.mktmpdir.

Upvotes: 2

Related Questions