fix tests, refactor shared context, switch to ruby-version file