Help wrtiting test for models that use CSV data

Hi, could use some help with this.

I have an app that imports CSV data (which it receives from another
app as an automated entry to a data field on a form)

I want to write test for the models that use this data. I have one
model with no database that takes the CSV record and makes it an
object that I can work with.

Then that object gets split into Customer, Order and LineItem models.

This means that I need CSV raw data to build the tests around. My
main question is where do I put this data and how do I store it. I
could build some test strings, or I could use test files, but it would
be nice to make them accessible to different model tests.

I am still green at writing tests and cant get my head around how best
to go about this.

Any ideas??


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs