'error() correctly prints stderr if it was previously hidden'

@mock_streams('stderr')
@with_patched_object(utils, 'abort', Fake('abort', callable=True, expect_call=True).calls((lambda x: sys.stderr.write((x + '\n')))))
def test_error_includes_stderr_if_given_and_hidden(self):

    stderr = 'this    is    my    stderr'
    with hide('stderr'):
        error('error    message', func=utils.abort, stderr=stderr)
    assert_contains(stderr, sys.stderr.getvalue())
