Added specs for replacing intervals

Fixes #157