Add spec (taken from solution to issue #2279)