[PATCH configure 1/4] Use RSpec 2.x

John Eckersberg jeckersb at redhat.com
Wed May 16 19:13:00 UTC 2012


The 'Spec' module is RSpec 1.x, which is deprecated in favor of RSpec
2.x.  Also, Fedora 17 does not provide RSpec 1.x.
---
 Rakefile            |   14 +++++++-------
 spec/spec_helper.rb |    4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Rakefile b/Rakefile
index f0bb9c5..267f11e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -18,7 +18,7 @@ require 'rake/clean'
 require 'rake/rpmtask'
 require 'rake/yumtask'
 require 'rubygems'
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
 
 CURRENT_DIR  = File.dirname(__FILE__)
 RPMBUILD_DIR = "#{File.expand_path('~')}/rpmbuild"
@@ -44,18 +44,18 @@ Rake::YumTask.new(YUM_REPO) do |repo|
 end
 
 desc "Run configure spec tests locally"
-Spec::Rake::SpecTask.new(:configure_spec) do |t|
-  t.spec_files = FileList['spec/configure_spec.rb']
+RSpec::Core::RakeTask.new(:configure_spec) do |t|
+  t.pattern = FileList['spec/configure_spec.rb']
 end
 
 desc "Run cleanup spec tests locally"
-Spec::Rake::SpecTask.new(:cleanup_spec) do |t|
-  t.spec_files = FileList['spec/cleanup_spec.rb']
+RSpec::Core::RakeTask.new(:cleanup_spec) do |t|
+  t.pattern = FileList['spec/cleanup_spec.rb']
 end
 
 desc "Run seed spec tests locally"
-Spec::Rake::SpecTask.new(:seed_spec) do |t|
-  t.spec_files = FileList['spec/seed_data_spec.rb']
+RSpec::Core::RakeTask.new(:seed_spec) do |t|
+  t.pattern = FileList['spec/seed_data_spec.rb']
 end
 
 begin
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 654acce..97c196b 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -13,8 +13,8 @@
 #   limitations under the License.
 
 require 'rubygems'
-require 'spec'
-require 'spec/autorun'
+require 'rspec'
+require 'rspec/autorun'
 
 $test_scripts = ENV['test_scripts']
 $test_scripts = ($test_scripts != "false" && $test_scripts != "n")
-- 
1.7.7.6




More information about the aeolus-devel mailing list