Sha256: d1de5b11dc085ff206da8821533d331f209f4ab97a3cac4b11f0ba6f31317540

Contents?: true

Size: 315 Bytes

Versions: 5

Compression:

Stored size: 315 Bytes

Contents

def run_spec(file)
  unless File.exist?(file)
    puts "#{file} does not exist"
    return
  end

  puts "Running #{file}"
  system "bundle exec rspec #{file}"
  puts
end

watch("spec/.*/*_spec\.rb") do |match|
  run_spec match[0]
end

watch("lib/(.*/.*)\.rb") do |match|
  run_spec %{spec/#{match[1]}_spec.rb}
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
overwatch-0.2.1 .watchr
overwatch-0.2.0 .watchr
overwatch-cli-0.1.1 .watchr
overwatch-cli-0.1.0 .watchr
overwatch-collection-0.1.1 .watchr