Commit 6ec9ed6f

mo k <mo@mokhan.ca>
2012-05-22 14:01:54
got the tests passing.
1 parent f6b46ba
Changed files (3)
app
models
spec
app/models/user.rb
@@ -10,7 +10,7 @@ end
 
 class User < ActiveRecord::Base
   validates :name,  :presence => true
-  validates :website, :format => URI::regexp(%w(http https)), :presence => false
+  validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
   #validates_with UrlValidation
   has_many :authentications
   devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
spec/controllers/creations_controller_spec.rb
@@ -11,7 +11,6 @@ describe CreationsController do
   end
 
   before (:each) do
-    puts "WEBSITE #{user.website}"
     request.env['warden'] = mock(Warden, :authenticate => user, :authenticate! => user)
   end
 
spec/factories/user.rb
@@ -4,6 +4,6 @@ FactoryGirl.define do
     name 'mo'
     email 'mo@cakeside.com'
     password 'password'
-    website 'cakeside.com'
+    website 'http://cakeside.com'
   end
 end