You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by as...@apache.org on 2008/11/19 00:33:35 UTC

svn commit: r718794 - /ode/sandbox/singleshot/spec/people.rb

Author: assaf
Date: Tue Nov 18 15:33:35 2008
New Revision: 718794

URL: http://svn.apache.org/viewvc?rev=718794&view=rev
Log:
Most specs are working now, with the exception of tasks controller.

Modified:
    ode/sandbox/singleshot/spec/people.rb

Modified: ode/sandbox/singleshot/spec/people.rb
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/spec/people.rb?rev=718794&r1=718793&r2=718794&view=diff
==============================================================================
--- ode/sandbox/singleshot/spec/people.rb (original)
+++ ode/sandbox/singleshot/spec/people.rb Tue Nov 18 15:33:35 2008
@@ -28,16 +28,13 @@
     #
     # Without arguments, authenticates as 'person'.
     def authenticate(person = person('person'))
+      previous, session[:person_id] = session[:person_id], person.id
       if block_given?
         begin
-          previous, session[:person_id] = session[:person_id], person.id
           yield
         ensure
           session[:person_id] = previous
         end
-      else
-        session[:person_id] = person.id
-        person
       end
     end
 
@@ -59,4 +56,4 @@
   config.include SpecHelpers::People
   config.include SpecHelpers::People
   config.include SpecHelpers::Authentication, :type=>:controller
-end
\ No newline at end of file
+end