Your implementation here always captures both stdout and stderr.  Besides the extra work this does, it feels like a bug to me that in a spec like this:

``` ruby
expect {
  puts "calling the method"
  the_method
}.to output_to_stderr("foo")
```

...my debugging output of "calling the method" is silenced.  I've only told RSpec only to look at `stderr`, so why should it mess with `stdout`?

So, if you make a base class and two subclasses (one for stdout, one for stderr), you can implement the `capture_stream` method to capture only the appropriate stream.