deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1202673 - in /incubator/deltacloud/trunk/server: Rakefile spec/cimi/model/machine_template_spec.rb spec/cimi/model/schema_spec.rb spec/spec_helper.rb
Date Wed, 16 Nov 2011 12:48:55 GMT
Author: mfojtik
Date: Wed Nov 16 12:48:54 2011
New Revision: 1202673

URL: http://svn.apache.org/viewvc?rev=1202673&view=rev
Log:
CIMI: Updated RSpec to 2.0

Modified:
    incubator/deltacloud/trunk/server/Rakefile
    incubator/deltacloud/trunk/server/spec/cimi/model/machine_template_spec.rb
    incubator/deltacloud/trunk/server/spec/cimi/model/schema_spec.rb
    incubator/deltacloud/trunk/server/spec/spec_helper.rb

Modified: incubator/deltacloud/trunk/server/Rakefile
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/Rakefile?rev=1202673&r1=1202672&r2=1202673&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/Rakefile (original)
+++ incubator/deltacloud/trunk/server/Rakefile Wed Nov 16 12:48:54 2011
@@ -20,7 +20,7 @@
 require 'rake'
 require 'rake/testtask'
 require 'rubygems/package_task'
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
 
 begin
   require 'ci/reporter/rake/test_unit'
@@ -90,8 +90,9 @@ task :cucumber do
   end
 end
 
-Spec::Rake::SpecTask.new('spec') do |t|
-  t.spec_files = FileList['spec/**/*_spec.rb']
+RSpec::Core::RakeTask.new do |t|
+  t.pattern = FileList['spec/**/*_spec.rb']
+  t.rspec_opts = [ "--format", "nested", "--color", "-r ./spec/spec_helper.rb"]
 end
 
 begin

Modified: incubator/deltacloud/trunk/server/spec/cimi/model/machine_template_spec.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/spec/cimi/model/machine_template_spec.rb?rev=1202673&r1=1202672&r2=1202673&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/spec/cimi/model/machine_template_spec.rb (original)
+++ incubator/deltacloud/trunk/server/spec/cimi/model/machine_template_spec.rb Wed Nov 16
12:48:54 2011
@@ -13,15 +13,8 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 #
-
-require 'spec_helper'
-
-require 'cimi/model'
-
 describe "MachineTemplate model" do
 
-  DATA_DIR = File::join(File::dirname(__FILE__), '..', 'data')
-
   before(:all) do
     @xml = IO::read(File::join(DATA_DIR, "machine_template.xml"))
     @json = IO::read(File::join(DATA_DIR, "machine_template.json"))

Modified: incubator/deltacloud/trunk/server/spec/cimi/model/schema_spec.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/spec/cimi/model/schema_spec.rb?rev=1202673&r1=1202672&r2=1202673&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/spec/cimi/model/schema_spec.rb (original)
+++ incubator/deltacloud/trunk/server/spec/cimi/model/schema_spec.rb Wed Nov 16 12:48:54 2011
@@ -14,10 +14,6 @@
 # under the License.
 #
 
-require 'spec_helper'
-
-require 'cimi/model'
-
 describe "Schema" do
   before(:each) do
     @schema = CIMI::Model::Schema.new

Modified: incubator/deltacloud/trunk/server/spec/spec_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/spec/spec_helper.rb?rev=1202673&r1=1202672&r2=1202673&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/spec/spec_helper.rb (original)
+++ incubator/deltacloud/trunk/server/spec/spec_helper.rb Wed Nov 16 12:48:54 2011
@@ -16,10 +16,13 @@
 
 require 'rubygems'
 require 'pp'
-
+require 'rspec'
 require 'deltacloud/core_ext'
+require 'cimi/model'
 require 'xmlsimple'
 
+DATA_DIR = File::join(File::expand_path(File::dirname(__FILE__)), 'cimi', 'data')
+
 def parse_xml(xml, opts = {})
   opts[:force_content] = true
   opts[:keep_root] = true unless opts.has_key?(:keep_root)



Mime
View raw message