Upgrade rspec
remove debug line
add exception logging in test env
fix api tests