Add Rubocop and use RSpec expect syntax

As a first contribution, I've ported all the tests to the newly-blessed expect syntax, and fixed a bunch of rubocop style violations. WDYT?