You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2012/11/08 18:13:51 UTC
[13/15] git commit: CIMI tests (test_helper): add fetch method to get
a model class
CIMI tests (test_helper): add fetch method to get a model class
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f6fb0a99
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f6fb0a99
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f6fb0a99
Branch: refs/heads/master
Commit: f6fb0a9999d97cfbc78c7b4680987dad3cf96bf9
Parents: 9f67dc5
Author: David Lutterkort <lu...@redhat.com>
Authored: Tue Nov 6 16:10:46 2012 -0800
Committer: David Lutterkort <lu...@redhat.com>
Committed: Thu Nov 8 09:11:01 2012 -0800
----------------------------------------------------------------------
tests/cimi/test_helper.rb | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f6fb0a99/tests/cimi/test_helper.rb
----------------------------------------------------------------------
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)" }