New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give information on how to re-run specific spec items on test failure #205
Comments
I still don't know how this is done... Could you explain it so I don't have to wait for the patch :P I'm running with |
@prikhi It use a combination of the arguments of Let's walk through an example: -- Spec.hs
import Test.Hspec
main :: IO ()
main = hspec $ do
describe "Prelude" $ do
describe "reverse" $ do
it "reverses a list" False
describe "show" $ do
it "shows its argument" True
You now can rerun the failing spec by matching on the pretty-printed description
Or you can join all the components with
Or any substring of one of the above, e.g.:
|
If you use
|
If you are inclined to use
|
Also note that both
|
Also have a look at https://github.com/sol/hspec-example#running-tests |
Beautiful thank you :D Unfortunately my current use case is integration tests using hspec-webdriver and that seems to not play too nice with either the Ah well, good to know for the future, thanks! |
That sounds scary, probably a bug in |
I added this to the docs https://hspec.github.io/match.html |
Print information on how to rerun with
-m
and--rerun
. This should be aware ofrunhaskell
and GHCi, e.g. in ghci it should say:main ...
.Possibly, we want to introduce some "novice"-mode and make it less verbose if it is off.
The text was updated successfully, but these errors were encountered: