Quantcast
Viewing all articles
Browse latest Browse all 40

Wherever a unit test asserts that an error should be raised, specify the erro...

Recent rspec versions issue a warning if the following is done without passing an error class: expect {...}.to raise_error The reason is that this way any error is captured, which can mask programming errors with missing arguments and such. The fix is to pass the expected error class as argument to raise_error.

Viewing all articles
Browse latest Browse all 40

Trending Articles