Add more Spec command test coverage

Change STDIN to $stdin so it can be reassigned
Use UI.puts instead of print
Add test coverage for Spec#choose_from_array
Fix off by one issue in Spec#choose_from_array

Closes #1675