geemus/formatador — Issue #6: Tests fail when redirected to a file
Author: bkabrda
Created: 2011-10-17 06:57:27+00:00
State: open

Hi,
I just found out, that when you redirect the test output to a file, the 3 table tests fail, because you don't do the formatting. For example:

#display_table([{:a => 1}, {:a => 2}]) - returns " +---+\n | \e[1ma\e[0m |\n +---+\n | 1 |\n +---+\n | 2 |\n +---+\n"
expected => " +---+\n | \e[1ma\e[0m |\n +---+\n | 1 |\n +---+\n | 2 |\n +---+\n"
returned => " +---+\n | a |\n +---+\n | 1 |\n +---+\n | 2 |\n +---+\n"

I believe that this is not an issue with formatador itself, but with the tests. I think they should react to the situation when redirected to a file.

Thanks,
Bohuslav Kabrda.