diff --git a/spec/lib/use_case/reaction/create_spec.rb b/spec/lib/use_case/reaction/create_spec.rb index a438f108..243b227a 100644 --- a/spec/lib/use_case/reaction/create_spec.rb +++ b/spec/lib/use_case/reaction/create_spec.rb @@ -5,7 +5,7 @@ require "rails_helper" describe UseCase::Reaction::Create do shared_examples_for "valid target type" do it "creates a reaction" do - expect { subject }.to change { target.smile_count }.by(1) + expect { subject }.to change { target.reload.smile_count }.by(1) end end diff --git a/spec/lib/use_case/reaction/destroy_spec.rb b/spec/lib/use_case/reaction/destroy_spec.rb index 44c0e9a2..f979db66 100644 --- a/spec/lib/use_case/reaction/destroy_spec.rb +++ b/spec/lib/use_case/reaction/destroy_spec.rb @@ -9,7 +9,7 @@ describe UseCase::Reaction::Destroy do end it "destroys a reaction" do - expect { subject }.to change { target.smile_count }.by(-1) + expect { subject }.to change { target.reload.smile_count }.by(-1) end end