我一直试图在我最近负责的Rails应用程序中运行一个"真实"单元测试,mac_test.rb.它看起来像这样:
require 'test_helper'
class MacTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
Run Code Online (Sandbox Code Playgroud)
我跑了rake db:test:prepare
,我正试图运行测试ruby -I test test/unit/mac_test.rb
.
但是,我得到以下缩写错误输出:
Loaded suite test/unit/mac_test
Started
EEEEEEEEEEEEEEE
Finished in 0.377261 seconds.
1) Error:
test_datas(ActionController::IntegrationTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: vendors: DELETE FROM "vendors" WHERE 1=1
2) Error:
testjigs(ActionController::IntegrationTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: vendors: DELETE FROM "vendors" WHERE 1=1
3) Error:
test_datas(ActionController::TestCase):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: vendors: DELETE FROM …
Run Code Online (Sandbox Code Playgroud)