Skip to content

History of given

jimweirich edited this page Aug 29, 2012 · 2 revisions

Ruby Hoedown (2009?)

A bunch of folks from EdgeCase were attending the Ruby Hoedown conference (in 2009 I think) and were sitting around a table near the back of the room. My mind was wandering during some of the talks, thinking about how to do testing better. I really like the Given/When/Then approach in cucumber, but the heavy-weight step definitions were too much for simple unit testing. I wanted a DSL-like syntax that really reflected the nature of Ruby.

So I grabbed a piece of paper, sketched out some code samples on it and passed it around the table for comment. I merely asked "If you were to see a test written out like this, could you figure out what was going on"? I got lots of feedback and ideas from the process.

My favorite feedback was from Joe O'Brien who turned to me and asked in a serious voice "You're not really thinking of writing another test framework in Ruby, are you?" I assured him I had no intention of doing that and was just exploring some ideas.