fixes for hyperviser spec tests

- move shared code to helpers.rb
- general cleanup