Chronicling my experiences with ruby on rails, web application development/management.

Monday, March 9, 2009

Rails Testing Confessions

Father, My name is pjammer and i have confession to make. I've made 4 web apps and didn't test one of them, in a rails sense.


That's right. Not one of my apps were tested using shoulda, coulda, woulda. Rspec was just a figment of someone's imagination, when i launched my apps, cause it sure wasn't in my mind's eye. Factory girl is a movie about some broad from the 60's and Object daddy just sounds creepy


Let me repent for my testing sins!!!


Father, I'm here today to repent for the sins of not testing my apps. I really want to learn


Learning about testing is like searching google for a future thought. Lots of ideas you can get out of it, but nothing that says "HERE IT IS MY SON".

This post won't help you either, but it should give others who want to make a lot of money, teaching other users how to write tests for rails, some kind of "IDEA" for a tell all book about testing.


The Big Idea


Father, why hath thou forsaken my learning? Learning Rails was easy... tonnes of help on blog posts, forums, etc... yet when it comes to LEARNING HOW TO TEST, doth hast left that chapter blank in thy bible


Here is what i think someone could make a mint from writing a book that steps a user through building tests from TIT to TAIL.


For instance:

  • What is testing and why it's important
  • There are four facets to testing
    • Functional Tests
    • Unit Tests
    • Integration Tests and
    • Fixtures
  • Take each testing facet above and step through each assertion and when to use each assertion and 5 or 6 real life examples for each.
  • Focus just on Test::Unit, Shoulda, and Machinist & Faker for Functional and Unit Testing, as well as fixtures
  • Lastly, use some cool visual tool like webrat or Selenium


Father, thank you. I will say my 10 hail mary's

In closing god would be happier with a book such as this, as less rails noobs and testing noobs would be praying for this kind of mundane nonesense. Leaving more time to fight the good fight.

No comments:

Post a Comment