# Ugly, garbled output from autotest

**URL:** <https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267>\
**Category:** Rails\
**Created:** [February 15, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267 "2008-02-15T22:35:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![idahoev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b5e925/32.png) [@idahoev](https://www.ruby-forum.com/u/idahoev)\
**Post date:** [February 15, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267/1 "2008-02-15T22:35:46Z")

</div>

I am getting this horribly ugly output from autotest when a test fails.

## Normal output from ‘rake test’:

1. Failure:  
test\_export\_format(TaskTest) [./test/unit/task\_test.rb:61]:  
\<“Michael Alvarez”\> expected but was  
.  
–

Same failure, as seen via autotest:

–

1. Failure:  
test\_export\_format(TaskTest) [./test/unit/task\_test.rb:61]:  
— /var/folders/sv/svC-nvosEl4YtAKb5zULK++++TI/-Tmp-/expect.596.0  
2008-02-15 15:27:00.000000000 -0600  
+++ /var/folders/sv/svC-nvosEl4YtAKb5zULK++++TI/-Tmp-/butwas.596.0  
2008-02-15 15:27:00.000000000 -0600  
@@ -1 +1 @@  
-Michael Alvarez  
+  
–

This is obviously pretty ugly and annoying. Nobody else I know sees  
this, yet I see it on both my macs in both OS X 10.4 and 10.5, and this  
bug has survived the last two upgrades of the ZenTest gem (currently  
3.9.1). I’d love to get this cleaned up. Any suggestions?

---

<div class="post-metadata">

**Author:** ![idahoev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b5e925/32.png) [@idahoev](https://www.ruby-forum.com/u/idahoev)\
**Post date:** [February 17, 2008, 5:39am UTC](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267/2 "2008-02-17T05:39:46Z")

</div>

could those be ansi color codes?

try adding this to the config block in you environment.rb

Rails::Initializer.run do |config|  
…  
config.active\_record.colorize\_logging = false  
end

On Feb 15, 1:35 pm, Evan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![idahoev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b5e925/32.png) [@idahoev](https://www.ruby-forum.com/u/idahoev)\
**Post date:** [February 17, 2008, 7:19am UTC](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267/3 "2008-02-17T07:19:28Z")

</div>

On Feb 15, 2008 1:35 PM, Evan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I am getting this horribly ugly output from autotest when a test fails.

That’s unit\_diff output. Sometimes it’s great, sometimes it’s ugly. If  
you want to turn it off, try putting this in your .autotest file:

unit\_diff = “cat”

~ j.

---

<div class="post-metadata">

**Author:** ![idahoev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b5e925/32.png) [@idahoev](https://www.ruby-forum.com/u/idahoev)\
**Post date:** [February 17, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267/4 "2008-02-17T19:22:15Z")

</div>

John B. wrote:

> That’s unit\_diff output. Sometimes it’s great, sometimes it’s ugly. If  
> you want to turn it off, try putting this in your .autotest file:
> 
> unit\_diff = “cat”

This fixed it. Thank you, thank you! Yer a genius!
