Enterprise Ready?

We've spent a lot of time ensuring that our test suite is quite solid, yet ran as fast as possible. The first step was removing access to the database from the unit tests. After that, we also looked at allowing ActiveRecord::Base subclasses to be tested without needing access to the database. The result is a sub 1-second unit test run that provides greater than 80% code coverage.

テストケースがどんどん溜まっていくと、当然テストは遅くなるので。僕の今のプロジェクトでは1秒以内で80%をカバレッジするユニットテストを実行できるなんて信じられません。だってフィクスチャをいっぱい使っているから。考えてみれば、Javaでテストケースを書いていた頃は極力DBUnitではなく素のJUnitだけでテストが動くようにしていました。Railsにもそういうアプローチを取るべきだと思います。フィクスチャを使うテストと使わないテストは分けて書くようにしないと、大量のテストを実行するのに時間が掛かってしまい、ZenTestなどを使ってもあまり嬉しくなくなってしまいます。

we stopped using migrations because of some pain we were feeling due to our team size. Instead, we drop and recreate our database with every build using ActiveRecord::Schema.define, a tip we picked up from Dave Thomas.

まじで?マイグレーションを使わずdb/schema.rbで毎回ビルドしたってあるけど、本番機にリリースする時とかどうするんだろう?マイグレーションの方が楽じゃない?