[Previous entry: "Painting the floor"] [Next entry: "Nothin' from nothin' leaves nothin'..."]
12/10/2005: "I'm disappointed with FIT"
I have just spent the better part of a day trying to start a small project with FIT, working in Ruby. My experience has been especially frustrating, not because my environment was bad, but because after all the work it took to fix my environment, FIT disappointed me in the end.
Just to paint the picture, I had to install XCode 2.2 so I could install readline so I could install postgresql so I could run Rails. After four hours of troubleshooting, Googling and fixing, I was ready to run tests with FIT.
I checked out the latest FIT from CVS, tried to run it, and no love. I ended up finding a defect related to a refactoring gone wrong. Didn't anyone run the tests?!
Finally, I tried to run my test page and FIT was downright rude.
Unable to parse input. Input ignored.Can't find tag: td /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:97:in `initialize' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `new' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `initialize' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `new' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `initialize' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/file_runner.rb:46:in `new' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/file_runner.rb:46:in `process' /Users/jbrains/Library/Ruby/fit/bin/../lib/fit/file_runner.rb:20:in `run' /Users/jbrains/Library/Ruby/fit/bin/fit.rb:9
Why can't it find my table cells? Apparently because OpenOffice's HTML editor (correctly) used such tags as thead, tbody and th in my table. Prettier that way. Isn't FIT supposed to make things easier for non-programmers?.
Being a "TDD asshat" (I've always loved that since I read it for the first time in some moron's rant), I wrote an integration test that showed, indeed, that FIT wouldn't parse my "fancy" table correctly. After I had a failing integration test, I went to an object test on Parse. I was about to write the test when I read the existing tests.
I just about lost it.
def test_parse_exception
begin
p = Parse.new 'leader<table><tr><th>one</th><th>two</th><th>three</th></tr><tr><td>four</td></tr></table>trailer'
fail 'Expected ParseException not thrown.'
rescue ParseException => e
assert_equal 17, e.error_offset
assert_equal "Can't find tag: td", e.message
end
end
Are you kidding me? FIT intentionally disallows tags like th?!
With the greatest love and respect to everyone involved, am I really the first person on this planet to write FIT test tables with an HTML editor that generates table headers?
I just don't have the energy to add support to Ruby FIT for this right now. I recognize that we're all volunteers and that I shouldn't be upset over this, but surely someone else has run into this problem. It just floors me that I might be the first.
Very disappointing. Not the way I wanted to end this programming session.
