vendredi 7 juillet 2017

expected ArgumentError but nothing was raised

My spec is:

expect { result }.to raise_error(ArgumentError)
#=> expected ArgumentError but nothing was raised

When I put debugger in the code, result is:

(pry) output error: #<ArgumentError: (...)

What's wrong with the spec? I use rspec-given

Aucun commentaire:

Enregistrer un commentaire