Sha256: a7fdf43c9fd64a963b7cf70706072ee922a0b012a19536bfbc8f18e7cf3b78d2
Contents?: true
Size: 361 Bytes
Versions: 21
Compression:
Stored size: 361 Bytes
Contents
# vim:set filetype=ruby: def run(cmd) puts cmd system cmd end def spec(file) if File.exists?(file) run("rspec #{file}") else puts("Spec: #{file} does not exist.") end end watch("spec/.*/*_spec\.rb") do |match| puts(match[0]) spec(match[0]) end watch("lib/(.*/.*)\.rb") do |match| puts(match[1]) spec("spec/#{match[1]}_spec.rb") end
Version data entries
21 entries across 21 versions & 3 rubygems