Rails で Mongoid を使用していますが、生成されたすべての機能テストが次のようなエラーで失敗します。
test_should_get_new(PostsControllerTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: comments: DELETE FROM "comments"
生成されるテストは次のとおりです。
require 'test_helper'
class PostsControllerTest < ActionController::TestCase
setup do
@post = posts(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:posts)
end
test "should get new" do
get :new
assert_response :success
end
[...]
end
テストを変更する必要がありますか?または、ActiveRecord または Sqlite への参照を削除しますか? (削除に問題があり、何にも使用していないため、アプリから完全に削除する方法がわからないため、まだgemfileにsqliteがあります)