Why don't you use `expect { ... }.to raise_error` helper?
https://www.relishapp.com/rspec/rspec-expectations/v/2-0/docs/matchers/expect-error