私は非常に紛らわしい問題に遭遇しました...
単独で実行すると、すべてのテストに合格します。レーキテストのように実行すると、統合テストを実行した後、マシニストは設計図を見つけることができなくなったと言います。
カピバラのテストを機能させるには、いくつかの魔法を呼び出す必要があります...
トランザクションフィクスチャを取得するには、次のようにすべてのアクティビティを1つのトランザクションに強制します。
#always use the same connection so updates inside of transactions are visible.
#allows the use of use_transactional_fixtures
ActiveRecord::ConnectionAdapters::ConnectionPool.class_eval do
def current_connection_id
#always fetch the connection for the main thread
# was Thread.current.object_id
Thread.main.object_id
end
def clear_reloadable_connections!
#do nothing, when connections are reloaded, otherwise the only connection is severed on each request
end
end
私のようなものを発行した後
、ブループリントを再び使用できるようにするためにvisit new_user_session_path
これを行う必要があり
ます。load "#{Rails.root}/test/blueprints.rb"
Machinistが単純な後に青写真を失う可能性がある方法についてのアイデアはありますvisit
か?