This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
! testkit: enable custom ExceptionHandlers in routing tests
Up to now the `~>` operator injecting a request into a test route always wrapped the route execution with the default ExceptionHandler thereby ignoring potentially existing custom ExceptionHandlers. This is fixed with this patch. The change to the public API consists of one additional member to the implicit `TildeArrow.injectIntoRoute` method, which should rarely be called directly. In most cases this change therefore shouldn't break anything.
- Loading branch information
680fde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into this problem using 1.1-M8. I tried using a nightly build (http://nightlies.spray.io/io/spray/spray-testkit/1.2-20130710/ - as 1.1 does not have a recent enough one) but I'm still seeing the problem. Has this fix not managed to get into the 1.1/1.2 release branches yet?
680fde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stig, no it hasn't.
I'll do a merge from master into the release branches right away, so tomorrow's nightly will be up to date for you.
680fde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent :-)
In the meantime I've done that merge locally and verified that it does indeed work. I was thinking I could try and add a regression test for it, but I don't see where it should sit.
680fde0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, merged and pushed.
If you'd like to add a regression test for it, I guess it could sit here:
https://github.com/spray/spray/blob/f4a9b8814bc6b1751f519d9fd76ef4237670513e/spray-testkit/src/test/scala/spray/testkit/Specs2RouteTestSpec.scala