Return-Path: X-Original-To: apmail-deltacloud-commits-archive@www.apache.org Delivered-To: apmail-deltacloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07F03D1E0 for ; Mon, 19 Nov 2012 11:44:11 +0000 (UTC) Received: (qmail 11817 invoked by uid 500); 19 Nov 2012 11:44:10 -0000 Delivered-To: apmail-deltacloud-commits-archive@deltacloud.apache.org Received: (qmail 11762 invoked by uid 500); 19 Nov 2012 11:44:09 -0000 Mailing-List: contact commits-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list commits@deltacloud.apache.org Received: (qmail 11742 invoked by uid 99); 19 Nov 2012 11:44:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 11:44:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5A9793149C8; Mon, 19 Nov 2012 11:44:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mfojtik@apache.org To: commits@deltacloud.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: CIMI: Fixed compare_values() method in tests to use 'key' instead of 'name' Message-Id: <20121119114408.5A9793149C8@tyr.zones.apache.org> Date: Mon, 19 Nov 2012 11:44:08 +0000 (UTC) Updated Branches: refs/heads/master bc54202e5 -> cdff6ca3c CIMI: Fixed compare_values() method in tests to use 'key' instead of 'name' Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/cdff6ca3 Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/cdff6ca3 Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/cdff6ca3 Branch: refs/heads/master Commit: cdff6ca3cb500f0f54c574df60497ec011c58edb Parents: bc54202 Author: Michal Fojtik Authored: Mon Nov 19 12:43:12 2012 +0100 Committer: Michal fojtik Committed: Mon Nov 19 12:43:12 2012 +0100 ---------------------------------------------------------------------- server/tests/cimi/spec_helper.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltacloud/blob/cdff6ca3/server/tests/cimi/spec_helper.rb ---------------------------------------------------------------------- diff --git a/server/tests/cimi/spec_helper.rb b/server/tests/cimi/spec_helper.rb index e86eaee..6ec7b0d 100644 --- a/server/tests/cimi/spec_helper.rb +++ b/server/tests/cimi/spec_helper.rb @@ -66,8 +66,8 @@ class HashCmp # and therefore not ordered, even though XmlSimple # represents them as an array; since that array can be generated # from a hash, in Ruby 1.8 the order of the array is random - exp = exp.sort! { |item1, item2| item1["name"] <=> item2["name"] } - act = act.sort! { |item1, item2| item1["name"] <=> item2["name"] } + exp = exp.sort! { |item1, item2| item1["key"] <=> item2["key"] } + act = act.sort! { |item1, item2| item1["key"] <=> item2["key"] } end 0.upto(exp.size-1) do |i| compare_values(exp[i], act[i], path + [ "#{name}[#{i}]" ])