spec/spec_helper.rb
# remove all projects from remote server except ones matching these names
remove all projects from remote server except ones matching these names
remove all projects from remote server except ones matching these names
def clear_projects(session, except_these=["test"])
  list = session.projects.list
  list.each { |l|
    if list[0].class == Hash and not except_these.member? l[:name]
      session.projects.delete? l[:id].to_i
    end
  }
end
def clear_projects ( session , except_these = [ "test" ] ) list = session . projects . list list . each { | l | if list [ 0 ] . class == Hash and not except_these . member? l [ :name ] session . projects . delete? l [ :id ] . to_i end } end
remove all projects from remote server except ones matching these names
remove all projects from remote server except ones matching these names
session
except_these