Add Mocha gem to the Gemfile as test dependency.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Re-factor and drop table-based tests (not quite as elegant as in Go).

Plus, stub Magic::version where needed.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>