summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-01-11 15:50:13 -0800
committerMatt Robinson <matt@puppetlabs.com>2011-01-11 15:53:02 -0800
commit4efc98a88385815913c193615c5c50e2d0680411 (patch)
tree4c857d01e3326c6b1633f147071ca7d176939f1b
parentbf2b07158f5e4e16e7a1a52e84257ae5d84d9e1c (diff)
downloadpuppet-4efc98a88385815913c193615c5c50e2d0680411.tar.gz
puppet-4efc98a88385815913c193615c5c50e2d0680411.tar.xz
puppet-4efc98a88385815913c193615c5c50e2d0680411.zip
maint: Remove unused Rakefile in spec directory
The Rakefile just created rake tasks so that you could run all the specs in a subdirectory. However, rspec already allows you to just give the subdirectory as an argument and does the same thing, so these rake tasks were unecessary.
-rw-r--r--spec/Rakefile91
1 files changed, 0 insertions, 91 deletions
diff --git a/spec/Rakefile b/spec/Rakefile
deleted file mode 100644
index 28e1d8e79..000000000
--- a/spec/Rakefile
+++ /dev/null
@@ -1,91 +0,0 @@
-require File.join(File.dirname(__FILE__), "spec_helper.rb")
-require 'rake'
-require 'spec/rake/spectask'
-
-basedir = File.dirname(__FILE__)
-puppetlibdir = File.join(basedir, "../lib")
-puppettestlibdir = File.join(basedir, "../test/lib")
-speclibdir = File.join(basedir, "lib")
-
-require 'find'
-
-include Find
-include FileTest
-
-$exclusions = %W(lib)
-
-filemap = Hash.new { |hash, key| hash[key] = [] }
-
-allfiles = []
-
-# First collect the entire file list.
-find(".") do |f|
- # Get rid of the leading ./
- f = f.sub(/^\.\//, '')
-
- file = File.basename(f)
- dir = File.dirname(f)
-
- # Prune . directories and excluded dirs
- if (file =~ /^\./ and f != ".") or $exclusions.include?(File.basename(file))
- prune
- next
- end
- next if f == "."
- next if dir == "."
-
- # If we're a ruby script, then add it to the list of files for that dir
- if file =~ /\.rb$/
- allfiles << f
- # Add it to all of the parent dirs, not just our own
- parts = File.split(dir)
- if parts[0] == "."
- parts.shift
- end
- parts.each_with_index { |part, i|
- path = File.join(parts[0..i])
- filemap[path] << f
- }
- end
-end
-
-
-libs = [puppetlibdir, puppettestlibdir, speclibdir]
-desc "Run all specs"
-Spec::Rake::SpecTask.new('all') do |t|
- t.spec_files = FileList['integration/**/*.rb', 'unit/**/*.rb']
- t.libs = libs
- t.spec_opts = ['--options', 'spec.opts']
-end
-
-task :default => [:all]
-
-# Now create a task for every directory
-filemap.each do |dir, files|
- ns = dir.gsub "/", ":"
-
- # First create a separate task for each file in the namespace.
- namespace ns do
- files.each do |file|
- Spec::Rake::SpecTask.new(File.basename(file, '.rb').to_sym) do |t|
- t.spec_files = [ file ]
- t.libs = libs
- t.spec_opts = ['--options', 'spec.opts']
- end
- end
- end
-
- # Then create a task that matches the directory itself.
- Spec::Rake::SpecTask.new(dir) do |t|
- if ENV["TESTFILES"]
- t.spec_files = ENV["TESTFILES"].split(/\s+/)
- else
- t.spec_files = files.sort
- end
- t.libs = libs
- t.spec_opts = ['--options', 'spec.opts']
- end
-
- # And alias it with a slash on the end
- task(dir + "/" => dir)
-end