We tend to implement this as:

```ruby
should.raise ArgumentError do
  @project.reference_for_path(@project.path.basename)
end.message.should.match /not this project/
```