customink-webops / hostsfile

Easily manage your hosts file with Chef
Apache License 2.0
155 stars 82 forks source link

Fix manipulator unit tests #98

Closed gnjack closed 6 years ago

gnjack commented 6 years ago

Stub File.exist? instead of File.exists? Do not globally stub all File calls, only ones to expected host file paths

The "removes the duplicate hostnames" test should now be expecting the 3rd (not 2nd) entry to be removed - update expectation to generically find the example.com entry

gnjack commented 6 years ago

Just noticed this is a partial duplicate of https://github.com/customink-webops/hostsfile/pull/95 but this PR also fixes the remaining failing tests.

tas50 commented 6 years ago

Thanks for putting this together.