2

I'm currently writing unit tests for my Ruby on Rails application, and one of my models is a normal Ruby class for parsing XML files. I now wish to write unit tests for this class using a correct and incorrect xml file. The only question is, where do I place these files inside the entire Ruby on Rails structure?

I can probably dump em anywhere I want, but I was wondering if there is some sort of convention on where to place them so that I can just call 'correct.xml' as path for the unit tests instead of specifying the entire path.

codingbunny
  • 3,989
  • 6
  • 29
  • 54

2 Answers2

1

A good place to put your file is test\fixtures\assets

Geraldo
  • 22
  • 1
  • allright. Currently I've placed them inside test/files. But if your suggestion is the convention then i'll follow that – codingbunny May 19 '11 at 12:32
0

Since you writing a test cases for your model so better keep all test cases under the following directory.

Project\test\unit

manish kumar
  • 21
  • 1
  • 3