an alternative to having to worrying about mocking here is to get a valid ui object, which has passed in a `StringIO` object for stdout/err, etc. you can then stub the `UI` class to return your real UI object and then just do something like this for the assertion:
```ruby
@my_ui.string.should match /foo\: bar/
```

make sense?