起きた問題
Mechanize gem を使い、テストを実行しても以下のエラーが出る。
sparklemotion/mechanize: Mechanize is a ruby library that makes automated web interaction easy.
# テスト rails test
エラーメッセージ
Queue not empty, but all workers have finished. This probably means that a worker crashed and 1 tests were missed. (RuntimeError)
解決
結論からいうと、以下コマンドでテストが通った。
rake test
rails test
ではなく、rake test
じゃないとダメだった。ドキュメントに書いてあったのに、いつもの感じでrails test
していた…。
学び
テストコマンドが指定されていたら、それで実行すること。