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.
This causes unexpected behaviour: The
not_to
spec will always pass, whilst theto include
specs don't test for the presence of the command line, rather nothing. This is because Ruby treats theinclude
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 wherenot_to
andto
were flipped.