Sha256: 497893ad4663e82867973ebb7d761d3f9975e561549c0a26fc8bc88b179c2568
Contents?: true
Size: 533 Bytes
Versions: 9
Compression:
Stored size: 533 Bytes
Contents
# encoding: utf-8 # ./tasks.rb spec/nake/argv_spec.rb spec/nake/task_spec.rb task(:spec) do |*paths, options| paths.push("spec") if paths.empty? sh "spec", *paths end Task.new("spec:stubs") do |task| task.description = "Create stubs of all library files." task.define do Dir.glob("lib/**/*.rb").each do |file| specfile = file.sub(/^lib/, "spec").sub(/\.rb$/, '_spec.rb') unless File.exist?(specfile) sh "mkdir -p #{File.dirname(specfile)}" sh "touch #{specfile}" end end end end
Version data entries
9 entries across 9 versions & 2 rubygems