tests ported to MiniTest:Spec; additional tests added
initial working implementation