Fixes 4642: Intermittent test failures on rundeck functional tests

checking if hosts.nil? seemed redundant to me because of the `assert_not_empty hosts` but according to the error in the issue:
````
undefined method `[]' for nil:NilClass (NoMethodError)
/var/lib/workspace/workspace/test_develop/database/postgresql/ruby/1.8.7/test/functional/hosts_controller_test.rb:729:in `test_0059_index returns YAML output for rundeck'
````
 it seems that it it possible somehow.
I reproduced the error when adding `hosts = nil` after the first assert, a different error appeared when I changed host, host.name and even hosts[host.name] to nil