thoughtbot / appraisal

A Ruby library for testing your library against different versions of dependencies.
https://thoughtbot.com
MIT License
1.25k stars 107 forks source link

Avoid line continuations without parentheses. #138

Closed nickcharlton closed 6 years ago

nickcharlton commented 6 years ago

This causes unexpected behaviour: The not_to spec will always pass, whilst the to include specs don't test for the presence of the command line, rather nothing. This is because Ruby treats the include as having no argument and the string below as a string literal.

If we wrap in parentheses, the positive spec fails as the path is relative to the root partition.

The solution here is to provide a full path when comparing gemfile='...'. This also fixes a broken expectation where not_to and to were flipped.