deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [2/5] git commit: CIMI tests: set last_response every time we retrieve an object
Date Thu, 25 Apr 2013 00:10:19 GMT
CIMI tests: set last_response every time we retrieve an object

This measn that lastr_response is also set by fetch


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/44eb1ad6
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/44eb1ad6
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/44eb1ad6

Branch: refs/heads/master
Commit: 44eb1ad69fccaa4bc099b40b29eb9d0f27e60c53
Parents: 2fd5bed
Author: David Lutterkort <lutter@redhat.com>
Authored: Wed Apr 24 14:03:04 2013 -0700
Committer: David Lutterkort <lutter@redhat.com>
Committed: Wed Apr 24 14:03:04 2013 -0700

----------------------------------------------------------------------
 tests/cimi/test_helper.rb |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/44eb1ad6/tests/cimi/test_helper.rb
----------------------------------------------------------------------
diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb
index 778bb8f..9b3c81d 100644
--- a/tests/cimi/test_helper.rb
+++ b/tests/cimi/test_helper.rb
@@ -509,8 +509,6 @@ class CIMI::Test::Spec < MiniTest::Spec
           @_memoized[k] = retrieve(k, &block)
         end
       end
-      @@_cache[:last_response] ||= {}
-      @@_cache[:last_response][@format] = resp
       parse(resp)
     end
   end
@@ -543,6 +541,9 @@ class CIMI::Test::Spec < MiniTest::Spec
         response.xml.namespaces["xmlns"].must_equal CIMI::Test::CIMI_NAMESPACE
       end
     end
+    @@_cache ||= {}
+    @@_cache[:last_response] ||= {}
+    @@_cache[:last_response][@format] = response
     response
   end
 end


Mime
View raw message