2023-05-04から1日間の記事一覧

RSpec 3.12 + rspec-rails 6.0.2にて、change + have_attributesマッチャを使うとエラーになるため、回避策を試してみた

RSpecの change マッチャを使うと、処理前後における値の変化を検証できます。 https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/change/ 例えば # == Schema Information # # Table name: favorites # # id :integer not null, prim…