From 1faf0efa4b886b6389752d36b2e2310b730a2030 Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Sun, 7 Aug 2011 08:43:43 +1000 Subject: [PATCH] Spec helper validate method setup in test models not needed --- spec/spec_helper.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9417565..ae6efae 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -49,9 +49,7 @@ class Person attribute :birth_date, :date attribute :birth_time, :time attribute :birth_datetime, :datetime - validates_date :birth_date - validates_time :birth_time - validates_datetime :birth_datetime + define_attribute_methods model_attributes.keys end @@ -73,9 +71,6 @@ ActiveRecord::Schema.define(:version => 1) do end class Employee < ActiveRecord::Base - validates_date :birth_date - validates_time :birth_time - validates_datetime :birth_datetime define_attribute_methods attr_accessor :redefined_birth_date_called