Check out example codes for "expect method call inside rescue rspec". It will help you in understanding the concepts better.

Code Example 1

it { expect { object.somethig rescue StandardError }.not_to change(cat, :status) }

Learn ReactJs, React Native from akashmittal.com