Tests added

I would put the above in a separate file, to be `require`'d later by different spec files, so all of them can be run independently.