GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of robbyrussell/rubyurl
Clone URL: git://github.com/adelcambre/rubyurl.git
Removed an extra space in a spec and reduced a line in Link.add_visit
Robby Russell (author)
Sun Mar 02 17:08:48 -0800 2008
commit  e0346a323c6c102e38481411c412fde1998de331
tree    c3b21f236df0397612e6bc6be0792034e1ea29c3
parent  61057f107e17827d1653fc9d858eb0f68d5fd405
...
15
16
17
18
19
 
20
21
22
...
15
16
17
 
 
18
19
20
21
0
@@ -15,8 +15,7 @@ class Link < ActiveRecord::Base
0
   end
0
   
0
   def add_visit(request)
0
- visit = visits.build
0
- visit.ip_address = request.remote_ip
0
+ visit = visits.build(:ip_address => request.remote_ip)
0
     visit.save
0
     return visit
0
   end
...
36
37
38
39
 
40
41
42
...
36
37
38
 
39
40
41
42
0
@@ -36,7 +36,7 @@ describe "Planet Argon link " do
0
     request.stub!(:remote_ip).and_return('127.0.0.1')
0
     lambda do
0
       @link.add_visit(request)
0
- end.should change (@link.visits, :count).by(1)
0
+ end.should change(@link.visits, :count).by(1)
0
   end
0
 end
0
 

Comments

    No one has commented yet.