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
merged 4 commits into from Feb 26, 2020

Conversation

RobinDaugherty
Copy link
Member

@RobinDaugherty 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.

@felixbuenemann
Copy link
Contributor

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

@RobinDaugherty
Copy link
Member Author

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
@RobinDaugherty RobinDaugherty deleted the fix/shortval-assertion-should-fail branch February 26, 2020 19:23
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.

None yet

2 participants