How to ensure views get updated while running tests

It is true that the only way to be totally sure, is to use “save with persistence guarantee” with “stale=false option to views”

I think you can try to use cbgb project for doing that. It is lightweight version of Couchbase written in Go language, which exposes the same API: http://cbgb.io/

By default cbgb will listen on the same port, so that you don’t need change anything on the ruby side.