From 0c26d1281f49c52c867ef33776d6ba6ed9817775 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20W=20Mittag?= Date: Fri, 31 Dec 2010 17:08:57 +0100 Subject: [PATCH] Fix up version differences. When using new versions of tools, it helps to actually upgrade the calls to those versions. Ahem. --- .rspec | 2 ++ akkordarbeit.gemspec | 3 +-- features/step_definitions/akkordarbeit_steps.rb | 2 +- spec/spec.opts | 3 --- spec/spec_helper.rb | 4 ++-- tasks/spec_task.rb | 9 ++++----- 6 files changed, 10 insertions(+), 13 deletions(-) create mode 100644 .rspec delete mode 100644 spec/spec.opts diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..0eb654b --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--format nested diff --git a/akkordarbeit.gemspec b/akkordarbeit.gemspec index f7f4c04..410af9b 100644 --- a/akkordarbeit.gemspec +++ b/akkordarbeit.gemspec @@ -34,9 +34,8 @@ or plaintext. akkordarbeit_spec.rb akkordarbeit_suite.rb spec_helper.rb - spec.opts ] - SPECFILES = SPECS.map { |f| File.join SPECDIR, f } + SPECFILES = SPECS.map { |f| File.join SPECDIR, f } << '.rspec' TESTFILES = FEATUREFILES + SPECFILES diff --git a/features/step_definitions/akkordarbeit_steps.rb b/features/step_definitions/akkordarbeit_steps.rb index 0e111de..99f8407 100644 --- a/features/step_definitions/akkordarbeit_steps.rb +++ b/features/step_definitions/akkordarbeit_steps.rb @@ -5,7 +5,7 @@ # This code is licensed under the terms of the MIT License (see LICENSE.rdoc) require 'cucumber' -require 'spec/expectations' +require 'rspec/expectations' stepsdir = File.expand_path(File.dirname __FILE__).gsub(/(.*step_definitions).*?/, '\1') featuredir = File.expand_path File.join(stepsdir, '..') diff --git a/spec/spec.opts b/spec/spec.opts deleted file mode 100644 index 238306b..0000000 --- a/spec/spec.opts +++ /dev/null @@ -1,3 +0,0 @@ ---colour ---diff unified ---format nested diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 72683ff..215a691 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,8 +4,8 @@ # Copyright (c) 2009 Marc Rummel # This code is licensed under the terms of the MIT License (see LICENSE.rdoc) -require 'spec' -require 'spec/autorun' +require 'rspec' +require 'rspec/autorun' libdir = File.expand_path File.join(File.dirname(__FILE__), 'lib').gsub(/(.*)spec.*?/, '\1') $LOAD_PATH.unshift libdir unless $LOAD_PATH.include? libdir diff --git a/tasks/spec_task.rb b/tasks/spec_task.rb index 943e5cd..636d27e 100644 --- a/tasks/spec_task.rb +++ b/tasks/spec_task.rb @@ -4,13 +4,12 @@ # Copyright (c) 2009 Marc Rummel # This code is licensed under the terms of the MIT License (see LICENSE.rdoc) -require 'spec/rake/spectask' +require 'rspec/core/rake_task' taskdir = File.expand_path(File.dirname __FILE__).gsub(/(.*tasks).*?/, '\1') -Spec::Rake::SpecTask.new do |t| - t.warning = true +RSpec::Core::RakeTask.new(:spec) do |t| + t.ruby_opts = '-w' t.rcov = true - t.rcov_dir = File.join 'coverage', 'spec' - t.spec_opts = %W[--options "#{File.expand_path(File.join taskdir, '..', 'spec', 'spec.opts')}"] + t.rcov_opts = ['-o', File.join('coverage', 'spec')] end -- 2.11.4.GIT