実行rake db:migrate
してから実行するrake test:units
と、次のようになります。
rake test:functionals
(in /projects/my_project)
rake aborted!
SQLite3::SQLException: index unique_schema_migrations already exists: CREATE UNIQUE INDEX "unique_schema_migrations" ON "ts_schema_migrations" ("version")
の関連部分db/schema.rb
は次のとおりです。
create_table "ts_schema_migrations", :id => false, :force => true do |t|
t.string "version", :null => false
end
add_index "ts_schema_migrations", ["version"], :name => "unique_schema_migrations", :unique => true
このインデックスを手動で変更することはなく、RailsのデフォルトのSQLite3アダプターと新しいデータベースを使用しています。(つまり、rm db/*sqlite3
前に実行rake db:migrate
しても役に立ちません。)
タスクはtest:units
おそらくスキーマを再ロードしようとしていますか?もしそうなら、なぜですか?スキーマがすでに最新であることを認識すべきではありませんか?