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

Fix various specs that were passing incorrectly #453

merged 4 commits into from Feb 26, 2020


Copy link

RobinDaugherty commented Feb 26, 2020

Many specs for the ErrorPage were only looking at whether certain strings appeared in the HTML that was generated. But for different reasons, the string being matched could be included in the generated HTML for other reasons.

For example, if an exception was raised inside of the spec example, the resulting page would be rendered from that exception instead, and it would include lines of code from the exception.

There was some attempt to fix this by breaking up strings in the specs and concatenating them at runtime so that the entire string wasn't in the spec file.

The fix is to use HTML matching and verify that the page contains the correct tags with the content, not just the text.

This failure was exposed by CI failure in #449.

They were finding it in the exception backtrace that was being dumped to the HTML.
and expose another should-be-failing spec
Copy link

felixbuenemann commented Feb 26, 2020

Great, I was completely puzzled by the obscure string concatenation in the specs.

Copy link
Member Author

RobinDaugherty commented Feb 26, 2020

Yeah, this was surprising. The deeper I dug, the more broken specs I found. Really glad we found this!

@RobinDaugherty RobinDaugherty merged commit c24c87f into master Feb 26, 2020
3 checks passed
3 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@RobinDaugherty RobinDaugherty deleted the fix/shortval-assertion-should-fail branch Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.