add tests for Pipe scoping (#39)