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/05/10 02:16:03 UTC
svn commit: r654992 - /ode/sandbox/singleshot/spec/common.rb
Author: assaf
Date: Fri May 9 17:16:03 2008
New Revision: 654992
URL: http://svn.apache.org/viewvc?rev=654992&view=rev
Log:
Fix to all_roles
Modified:
ode/sandbox/singleshot/spec/common.rb
Modified: ode/sandbox/singleshot/spec/common.rb
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/spec/common.rb?rev=654992&r1=654991&r2=654992&view=diff
==============================================================================
--- ode/sandbox/singleshot/spec/common.rb (original)
+++ ode/sandbox/singleshot/spec/common.rb Fri May 9 17:16:03 2008
@@ -32,9 +32,9 @@
attr_reader :authenticated
def all_roles
- singular = Task::SINGULAR_ROLES.inject({}) { |h, role| h.update(role=>person(role)) }
- (Task::PLURAL_ROLES - [:excluded_owner]).
- inject(singular) { |h, role| h.update(role.to_s.pluralize.to_sym=>Array.new(3) { |i| person("#{role}#{i}") }) }
+ singular = ['creator', 'owner'].inject({}) { |h, role| h.update(role=>person(role)) }
+ ['potential_owners', 'observers', 'admins'].inject(singular) { |h, role|
+ h.update(role.to_sym=>Array.new(3) { |i| person("#{role.singularize}#{i}") }) }
end
end