We deploy using perforce labels. This little modification allows us to specify the label and get the label in the p4 commands as needed.
I added a perforce test file, none currently exist, and made some tests. Although I am testing a private method, I suppose it's better than what was there - which is nothing.
return p4_label if set
add some tests for the perforce.rb scm private method