RSpec tests

This is the test suite from development. According to simplecov the tests cover around 90% of the code (excluding gemfiles)