Testing with Rails

A hint with writing tests with Ruby on Rails.  If you are using fixtures, the name of the fixture is the name of the database table, not the name of the model under test.


For instance, this code:


class TaskTest < Test::Unit::TestCase
  fixtures :tbl_task


The symbol :tbl_task is the name of the database table.

Popular posts from this blog

Lists and arrays in Dart

The 29 Healthiest Foods on the Planet

Converting Array to List in Scala