(learning/maint) Refactor hpux_spec.rb to reduce test redundancy

Prior to this commit hpux_spec.rb had a flay score of over 1000 due to redundant test specifications.

This commit introduces a ruby hash encapsulating three redundant test cases, bringing the score given by 'flay hpux_spec.rb' to under 900.