On Sep 26, 2008, at 1:18 PM, Mark Wilden wrote:

On Fri, Sep 26, 2008 at 9:47 AM, Ashley Moran <[EMAIL PROTECTED] > wrote:

(be sure to spec what attributes your classes have if you're scared of pollution!)

As part of the TDD process, I spec all attributes, but this doesn't seem universal. Is this a misconception? Do people actually make sure that all columns exist and can be written to and read from?


I usually end up doing something like this:

  columns = [:email, :message]
  columns.each do |column|
    it "should have a reader and writer for the column #{column}" do
      @invite.should respond_to(column)
      @invite.should respond_to("#{column}=")
    end
  end

Scott
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to