Add testing infrastructure

I just wanted to add a testing infrastructure so that it's easy to write tests for any new code added. Not focussed on adding tests to all the existing code. This includes configuring travis.

I've also added rubocop to ensure consistent syntax.

/cc @fosrias