summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2020-09-29 14:05:57 -0400
committerAustin Ziegler <austin@zieglers.ca>2020-09-29 14:05:57 -0400
commit2581c73a0d7a3dccb6eaf5e297ee32137b5b20cd (patch)
tree5f07664ca7fc7f732c58b582b8a501a54ca1abef /Rakefile
parenta7f3702b549e51a3ce8cc20e692b4ecbd38fd00c (diff)
downloaddiff-lcs-2581c73a0d7a3dccb6eaf5e297ee32137b5b20cd.tar.gz
Prepare for dropping rspec support in Hoe
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index afd9307..613a8d4 100644
--- a/Rakefile
+++ b/Rakefile
@@ -2,6 +2,7 @@
require 'rubygems'
require 'rspec'
+require 'rspec/core/rake_task'
require 'hoe'
Hoe.plugin :bundler
@@ -47,6 +48,14 @@ _spec = Hoe.spec 'diff-lcs' do
extra_dev_deps << ['rdoc', '>= 0']
end
+desc "Run all specifications"
+RSpec::Core::RakeTask.new(:spec) do |t|
+ rspec_dirs = %w(spec lib)
+ t.rspec_opts = []
+ t.rspec_opts << "-I#{rspec_dirs.join(":")}" unless rspec_dirs.empty?
+end
+task :default => :spec
+
if RUBY_VERSION >= '2.0' && RUBY_ENGINE == 'ruby'
namespace :spec do
desc "Runs test coverage. Only works Ruby 2.0+ and assumes 'simplecov' is installed."