Prev | Current Page 320 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"

txt
id => 1
username => Kevin
# Test data record in Single File format saved as catherine.txt
id => 2
username => Marshall, Catherine
CHAPTER 6 ?–  ACTIVE RECORD TESTING AND DEBUGGING 143
Again, we don??™t recommend using the single-file format, because it can quickly become
a time-consuming task just managing the files involved (and really, with this format, you aren??™t
saving much time as compared to directly doing the work in your database). I think you can
see that the YAML or CSV formats are much more friendly choices.
Wrapping It All Up
Believe it or not we have covered only the basics of unit testing. There are a lot more details
and scenarios we could go into, as they relate to doing proper testing for your applications (it
could probably fill a book in and of itself), but again, that is outside of the scope of this book.
Instead, it??™s our hope that we??™ve given you enough information to get your feet wet and feel
comfortable actually writing and using Ruby unit tests with your Active Record programs.


Pages:
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332