I'd really love to see a test case for this but even if you mock hwinfo output, the output can change and nobody will find out.

Another ideas is to check not for `dasd` or `DASD` but rather expect this to change/break without further notice.

    @have_dasd = disks.any? {|d| d["device"].uppcase == "DASD" }

by this you would make sure any case is accepted as DASD disk