it is usually better to not depend in test on other methods if possible and also it doesn't test case when it is changed inside, but not written. So I preffer here simple read of file and grep for required line like:
```
File.readlines("<path>".grep /^\s*DHCLIENT_SET_HOSTNAME\s*=\s*no\s*$/
```