and_raise are in RSpec because Ruby provides both
rescue are the error handling mechanism you are probably familiar with.
catch, although it behaves similarly to
rescue is used for control flow (when it is used at all). You will almost never encounter
throw in Ruby. https://coderwall.com/p/lhkkug/don-t-confuse-ruby-s-throw-statement-with-raise digs into the differences between the two.
Backing up a bit, testing private methods is considered an anti-pattern. Tests are all about the what and object does rather than the how. An object’s public interface are what it does. The private methods are implementation details. As a user of the object, you don’t need to know that they exist, or wether the public methods call out to private methods, other objects, or have all the logic inside themselves. The how remains nicely hidden within the encapsulation of the object.
Instead of testing private methods, test the behavior indirectly by testing the public methods on your object.