Fixed set_network method. Fixed broken tests. Added mocha to gemfile.