update ruby to 2.2
add basic tests