Task: Demonstrate RSpec's Exception Matching with raise error
Task: Demonstrate RSpec's Exception Matching with raise error: a task in Terminal-Lego-15k (Harbor dataset). In RSpec, you need to write tests that verify whether a method raises an exception. The old should raise syntax is deprecated. Your task is to create a Ruby file with methods that raise…
The task
In RSpec, you need to write tests that verify whether a method raises an exception. The old `should_raise` syntax is deprecated. Your task is to create a Ruby file with methods that raise exceptions, and an RSpec test file that correctly tests for raised exceptions using the modern `expect { }.to raise_error` syntax.
Part of PrimeIntellect/Terminal-Lego-15k.