Skip to content
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

Hspec as an alternative test framework? #25

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

schoettl
Copy link
Contributor

@schoettl schoettl commented Aug 23, 2020

@simonmichael does anything speak against hspec as alternative test framework?

Downsides:

  • three more dependencies (hspec, hspec-core, hspec-contrib)
  • a bit more complex argument handling or a different way to pass arguments to hspec

Benefits:

Sources:

@simonmichael
Copy link
Owner

Thanks! I agree that we should move off test-framework, if only because it's no longer maintained.

Of the current big two, tasty and hspec, I think tasty is the most successful and the most future-proof, and I'd favour choosing that. But I'll review this when I can.

@simonmichael
Copy link
Owner

Hi @schoettl, when you have time could you rebase this against latest master.

@simonmichael
Copy link
Owner

I had a look at this. I see both runners are still supported for now, I guess there's no harm in keeping both until we have tested a bit more. Merging, thank you!

@simonmichael simonmichael merged commit b0836bd into simonmichael:master Feb 16, 2023
@simonmichael
Copy link
Owner

CI failed with stackage nightly/GHC 9.4, so we probably need some bounds or code changes for newer hspec.
https://github.com/simonmichael/shelltestrunner/actions/runs/4199072857

@simonmichael
Copy link
Owner

Fixed.

@simonmichael
Copy link
Owner

Belatedly testing this; at least in the shelltestrunner and hledger repos, it seems to run a few tests but very slowly/hangingly. To reproduce in this repo, add --hspec in Makefile and run make test. @schoettl would you be able to look at this ?

@simonmichael
Copy link
Owner

Repro:

<
a
$ cat
a
$ shelltest a.test --hspec

It works with echo but not cat. Perhaps the fix is in shelltest.hs:runCommandWithInput.

@schoettl
Copy link
Contributor Author

Hi @simonmichael, thanks for testing and fixes. I plan to look at it this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants