This should be:
<pre>
expect { Task.find("unupgraded") }.to raise_error Razor::TaskNotFoundError, /match the message against this/
</pre>

Ideally you should match on more than a single word.  Also, you could have used `t.message.should be_include 'legacy'` for that test.  Not that this is nice, but...