Home
subscribe

L'etat, c'est moi

Mere Complexities sells the consulting and development services of me, Paul Wilson.

Conferences

Organising Scotland on Rails
Speaker, RailsConf Europe '08

Archive

Ruby on Rails – 4 Days total immersion

We’re half-way through our Geek Retreat, coding Ruby On Rails in an Ayrshire Cottage. A lot of us have been coding / learning rails in near-isolation, so it’s been great to be able to discuss issues and share techniques. Alan’s been writing about it, here for instance.

I’m feeling better about <a “http://en.wikipedia.org/wiki/Test_driven_development”>test-driving the controller / view side of things: previously I’ve been uncomfortable with the lack of orthogonality I’ve perceived in the standard functional tests; I’ve started experimenting with a more DSL style. Sneak preview:

 
    when_succesfully_getting(:cities)

    the_page_contains_a_table(:a_table) do |t|
      t.row "City", "Country" 
      t.row "Edinburgh", "Scotland" 
      t.row "Glasgow!!a[href='/buckfast']", "Scotland" 
      t.row "San Francisco", "USA" 
    end

    there_is_a_form(:new_city) do |f| 
      f.there_is "input#city_name" 
      f.there_is "input#city_country" 
    end

All