Test after_create_commit callback using `shoulda-callback-matchers` gem + rails 5 + rspec

I’m using shoulda-callback-matchers gem to test the callback. rails version is 5.2.2 and rspec version is 3.8.0.

Anyone know how to test after_create_commit callback using shoulda-callback-matchers gem ? It is working for after_create and after_update.

sample example context “callbacks” do let(:admission) { create(:admission) } it { expect(admission).to callback(:admission_created_notification).after(:create) } it { expect(admission).to callback(:admission_status_change_notification).after(:update) } end

thanks