deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 2/6] CIMI tests (test_helper): add fetch method to get a model class
Date Wed, 07 Nov 2012 00:49:01 GMT
From: David Lutterkort <lutter@redhat.com>

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

diff --git a/tests/cimi/test_helper.rb b/tests/cimi/test_helper.rb
index ace3e37..4f1ade2 100644
--- a/tests/cimi/test_helper.rb
+++ b/tests/cimi/test_helper.rb
@@ -17,7 +17,6 @@
 require 'rubygems'
 require 'require_relative'
 require_relative '../helpers/common.rb'
-
 require 'singleton'
 require_relative "../../server/lib/cimi/models"
 
@@ -121,6 +120,10 @@ class CIMI::Test::Spec < MiniTest::Spec
     @content_type = CONTENT_TYPES[fmt]
   end
 
+  def fetch(uri, model_class)
+    fetch_model(uri, model_class) { |fmt| get(uri, :accept => fmt) }
+  end
+
   def self.it desc = "anonymous", opts = {}, &block
     block ||= proc { skip "(no tests defined)" }
 
-- 
1.7.7.6


Mime
View raw message