www.francisfish.com

Click Bookshop to see my novels. Buddhist, father of 2, Ruby on Rails programmer for money, and fiction writer.

    follow me on Twitter

    Mass RSpec testing of required fields

    Lazy is the way to go:  [:user_id, :product_id, :person_id, :status, :purpose, :site_id].each do |field|    it "should have required #{field}" do      lambda {      

    Comments (0) . Thursday, 25 October 2007

    Standard RSpec tests for models

    The create_bank method looks like this:   def create_bank( options = {})    Bank.create({        :person_id     => 1,        :sort_c

    Comments (0) . Wednesday, 24 October 2007

    Just running RSpec on one thing while you fix it

    This is like an Autotest script but you have to tell it what files to watch, also can be used for anything that waits for when a file changes (assumes the file is called mywatch):#! /bin/shif [ "$#" -eq 0 ]then echo Usage: $0 command files&

    Comments (0) . Thursday, 18 October 2007

    Railscon 2007 Berlin

    I originally started a post about the conference but it got too old and Blog City deleted it. Never mind. Have another go. The conference was fantastic and I enjoyed every minute of it. The presentations are here.I went to the charity tutorial on te

    Comments (0) . Thursday, 18 October 2007