Domanda

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.

È stato utile?

Soluzione

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

Altri suggerimenti

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

Project\test\unit

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top