エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
【RSpec】validate_uniqueness_ofでテストが落ちるときの対処 - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
【RSpec】validate_uniqueness_ofでテストが落ちるときの対処 - Qiita
環境 Rails 6.1.3.1 ruby 2.7.1 mysql Ver 8.0.26 shoulda-matchersというGemを使ってテストを書くとき... 環境 Rails 6.1.3.1 ruby 2.7.1 mysql Ver 8.0.26 shoulda-matchersというGemを使ってテストを書くとき、下記のエラーでテストが通らない。 Expected Employee to validate that :number is unique, but this could not be proved. After taking the given Employee, whose :number is ‹0›, and saving it as the existing record, then making a new Employee and setting its :number to ‹0› as well, the matcher expected the new Employee to be invalid, but it