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

Converting Array to List in Scala

The 29 Healthiest Foods on the Planet