Ruby requires that any object passed to raise
must be an exception class or object:
2.4.3 :001 > raise Object.new
TypeError: exception class/object expected
from (irb):1:in `raise'
from (irb):1
from /Users/myron/.rvm/rubies/ruby-2.4.3/bin/irb:11:in `<main>'
As such, there’s no way to RSpec to be able to raise an arbitrary object.
Myron
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscribe@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/76d123cf-1fe0-4d88-b0fd-47a856253c22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CADUxQmv5n_2fYTHRtQpy9%3Dxeom1Cj8Mb4kUS7kQsx-a%3DM01hEA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CACp6SzUuvsS23SRw%2Bgwws3jiTCv-NazBOa3NJGyKBvNt8FV1_g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CADUxQmtYGyYV8CM6Vki0roDdUYkHK38H2EjkN%3DJ0kkbdjAmrnA%40mail.gmail.com.