summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2021-12-23 00:45:47 -0500
committerAustin Ziegler <austin@zieglers.ca>2021-12-23 00:45:56 -0500
commit49dd2dcfd1e4f9a6f4dc82011869c633d0c0b283 (patch)
tree24a95747358aa1c221639d8354644240174ca175
parent352003bb4e5d07ef77fa7b9fe347ebb1b1a36ed5 (diff)
downloaddiff-lcs-49dd2dcfd1e4f9a6f4dc82011869c633d0c0b283.tar.gz
Prevent tests from running more than oncev1.5.0
-rw-r--r--Rakefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 762bd69..fd7ee31 100644
--- a/Rakefile
+++ b/Rakefile
@@ -88,8 +88,11 @@ RSpec::Core::RakeTask.new(:spec) do |t|
rspec_dirs = %w(spec lib).join(":")
t.rspec_opts = ["-I#{rspec_dirs}"]
end
-task :default => :spec
-task :test => :spec
+
+Rake::Task["spec"].actions.uniq! { |a| a.source_location }
+
+task :default => :spec unless Rake::Task["default"].prereqs.include?("spec")
+task :test => :spec unless Rake::Task["test"].prereqs.include?("spec")
if RUBY_VERSION >= '2.0' && RUBY_ENGINE == 'ruby'
namespace :spec do