We make two important changes to our assertion syntax. First, we switch from the old RSpec "should" syntax to the new "expect" syntax. Then we implement "raise_error", allowing us to write tests that expect the tested code to fail. In the process, we begin to build our test runner's test suite, using the test runner to test itself.
Execute Program
Looking for something more interactive? Try Execute Program, an interactive learning platform from Destroy All Software LLC! It has courses on TypeScript, SQL, regular expressions, JavaScript concurrency, and more. All Destroy All Software subscriptions include full access to Execute Program, or you can subscribe to Execute Program directly.