Panasonic Youth

Mick Clark's Testing Session from Rails Conf

(little late in posting this…this is from the last day at RailsConf) I was a bit disappointed in Mike Clark’s talk on testing. It had a lot of very intro level, beginner type material. I would expect that from a No Fluff Just Stuff or user group meeting, but at RailsConf? Isn’t it safe to assume a higher level of basic knowledge at a conference like this, as I would guess at least 75% of the attendees are experienced refugees from other languages or long-time rubyists. Similiar to “Intro to Ajax” type material, I think we can move past things like “this is a unit test”, “this is how asserts work”, etc.

On the other hand, it was a general session in the ballroom with the whole conference there, so I can understand why he went for the basic, foundational material.

He went on to cover transactional fixtures, functional testing, mocks, and integration tests with DSL’s. He discussed a few tips at the end to decrease coupling, like using named routes and accessing fixtures by name, not id. Decent stuff, I just wish there was a lot more of it.

Here are some of the things I would’ve liked to see:

  • how can I unit test things in controllers in a true isolated manner?
  • why fixtures suck, and what can be done about it
  • a discussion of the terms used in Rails-testing vs TDD in Java/C# land
  • how to test helpers or stuff in your /lib directoy
  • tools to use locally - ie autotest, stakeout, how about some better feedback then "...F..." on the command line? I want colors and sound options
  • when/how to break apart the generated test cases when they get too large
  • Maybe next year...