Lets split this into two lines for readability.

```ruby
fake_stdout = StringIO.new
$stdout = fake_stdout
```