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
I've never seen anyone do this, do you know of any examples I can take a look at?