Authlogicが私のユニットテストを台無しにしているようです。私は任意のユニットテストを実行しようとすると、私が手:Authlogicでのユニットテスト3.2
authlogic/acts_as_authentic/base.rb:31:in `acts_as_authentic': You must establish a database connection before using acts_as_authentic (StandardError)
私のユニットテストが何であるかは重要ではありません。私のユニットテストファイルがすべてrequire 'test_helper'
であっても、私はまだエラーが発生します。これはもちろん、問題はおそらく私のtest/test_helper.rb
ファイルにあると私に伝えます。
は、ここに私のtest/test_helper.rb
(例hereに基づいて)です:
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'authlogic/test_case'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end
class ActionController::TestCase
setup :activate_authlogic
end
は、誰がこの問題を抱えてますか?私は何をすべきかわからない。
RSpecを使用するエンジンで同じ問題が発生します。 – Kris