if i understood correctly, chefspec is a fake.
"""
ChefSpec makes it easy to write examples and get fast feedback on cookbook changes without the need for virtual machines or cloud servers.

ChefSpec runs your cookbook locally using Chef Solo without actually converging a node.
"""

it doesnt really converge anything. no way to install nor configure etcd.
it cannot import 'services' module. i dont know what of get_endpoint to test using chefspec.
if theres no way to configure etcd server and make 'services' available to chefspec, i think its definitely useless to test get_endpoint using chefspec.