mattray/osops-utils — pull request #1 by jaypipes (2012-09-14 15:12:33+00:00)
Title: Adds ChefSpec tests for first part of ip_location library

* Adds start of ChefSpec/RSpec tests for the ip_location library
* 2 tests currently fail and represent bugs in the get_config_endpoint()
function:

jpipes@uberbox:~/repos/osops-utils$ rspec
......FF

Failures:

1) RCB#get_config_endpoint should return host and uri if nodeish contains uri and host
Failure/Error: result.should have_key("uri")
expected #has_key?("uri") to return true, got false
# ./spec/ip_location_spec.rb:68

2) RCB#get_config_endpoint should return host and uri if nodeish
contains uri and no host
Failure/Error: result.should have_key("uri")
expected #has_key?("uri") to return true, got false
# ./spec/ip_location_spec.rb:84

Finished in 0.00223 seconds
8 examples, 2 failures

Failed examples:

rspec ./spec/ip_location_spec.rb:55 #
RCB#get_config_endpoint should return host and uri
if nodeish contains uri and host
rspec ./spec/ip_location_spec.rb:73 #
RCB#get_config_endpoint should return host and uri
if nodeish contains uri and no host

Patch coming shortly with fixes for the above failures.