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

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

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