ruby-on-railsunit-testingconvention-over-configur

Ruby on Rails Unit Testing


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.


Solution

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