You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2011/11/24 14:20:09 UTC
svn commit: r1205818 - in /deltacloud/trunk/server/spec/cimi/model:
volume_configuration_spec.rb volume_image_spec.rb volume_template_spec.rb
Author: mfojtik
Date: Thu Nov 24 13:20:08 2011
New Revision: 1205818
URL: http://svn.apache.org/viewvc?rev=1205818&view=rev
Log:
CIMI: Converted some Volume models to use new spec helper syntax
Modified:
deltacloud/trunk/server/spec/cimi/model/volume_configuration_spec.rb
deltacloud/trunk/server/spec/cimi/model/volume_image_spec.rb
deltacloud/trunk/server/spec/cimi/model/volume_template_spec.rb
Modified: deltacloud/trunk/server/spec/cimi/model/volume_configuration_spec.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/spec/cimi/model/volume_configuration_spec.rb?rev=1205818&r1=1205817&r2=1205818&view=diff
==============================================================================
--- deltacloud/trunk/server/spec/cimi/model/volume_configuration_spec.rb (original)
+++ deltacloud/trunk/server/spec/cimi/model/volume_configuration_spec.rb Thu Nov 24 13:20:08 2011
@@ -22,16 +22,9 @@ describe "Volume Configuration model" do
@json = IO::read(File::join(DATA_DIR, "volume_configuration.json"))
end
- it "can be constructed from XML" do
- conf = CIMI::Model::VolumeConfiguration.from_xml(@xml)
- conf.should_not be_nil
- should_serialize_from_xml! conf, @xml, @json
+ it "can be constructed from XML and JSON" do
+ should_properly_serialize_model CIMI::Model::VolumeConfiguration, @xml, @json
end
- it "can be constructed from JSON" do
- conf = CIMI::Model::VolumeConfiguration.from_json(@json)
- conf.should_not be_nil
- should_serialize_from_json! conf, @xml, @json
- end
end
Modified: deltacloud/trunk/server/spec/cimi/model/volume_image_spec.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/spec/cimi/model/volume_image_spec.rb?rev=1205818&r1=1205817&r2=1205818&view=diff
==============================================================================
--- deltacloud/trunk/server/spec/cimi/model/volume_image_spec.rb (original)
+++ deltacloud/trunk/server/spec/cimi/model/volume_image_spec.rb Thu Nov 24 13:20:08 2011
@@ -21,16 +21,9 @@ describe "Volume Image model" do
@json = IO::read(File::join(DATA_DIR, "volume_image.json"))
end
- it "can be constructed from XML" do
- conf = CIMI::Model::VolumeImage.from_xml(@xml)
- conf.should_not be_nil
- should_serialize_from_xml! conf, @xml, @json
+ it "can be constructed from XML and JSON" do
+ should_properly_serialize_model CIMI::Model::VolumeImage, @xml, @json
end
- it "can be constructed from JSON" do
- conf = CIMI::Model::VolumeImage.from_json(@json)
- conf.should_not be_nil
- should_serialize_from_json! conf, @xml, @json
- end
end
Modified: deltacloud/trunk/server/spec/cimi/model/volume_template_spec.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/spec/cimi/model/volume_template_spec.rb?rev=1205818&r1=1205817&r2=1205818&view=diff
==============================================================================
--- deltacloud/trunk/server/spec/cimi/model/volume_template_spec.rb (original)
+++ deltacloud/trunk/server/spec/cimi/model/volume_template_spec.rb Thu Nov 24 13:20:08 2011
@@ -21,16 +21,8 @@ describe "Volume Template model" do
@json = IO::read(File::join(DATA_DIR, "volume_template.json"))
end
- it "can be constructed from XML" do
- conf = CIMI::Model::VolumeTemplate.from_xml(@xml)
- conf.should_not be_nil
- should_serialize_from_xml! conf, @xml, @json
- end
-
- it "can be constructed from JSON" do
- conf = CIMI::Model::VolumeTemplate.from_json(@json)
- conf.should_not be_nil
- should_serialize_from_json! conf, @xml, @json
+ it "can be constructed from XML and JSON" do
+ should_properly_serialize_model CIMI::Model::VolumeTemplate, @xml, @json
end
end