Sha256: 65f84281b86a6f8000afbec4c0f8b4bb95451491d9d8c2b4bdd0a1119137ba94

Contents?: true

Size: 775 Bytes

Versions: 13

Compression:

Stored size: 775 Bytes

Contents

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

  puts "Running #{file}"
  system "rspec #{file} --backtrace"
  puts
end

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

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

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

watch("lib/.*\.rb") do |match|
  run_spec "spec/helpers/nested_model_list_helper_spec.rb"
  run_spec "spec/helpers/nested_model_helper_spec.rb"
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
formnestic-1.0.12 .watchr
formnestic-1.0.11 .watchr
formnestic-1.0.10 .watchr
formnestic-1.0.9 .watchr
formnestic-1.0.8 .watchr
formnestic-1.0.7 .watchr
formnestic-1.0.6 .watchr
formnestic-1.0.5 .watchr
formnestic-1.0.4 .watchr
formnestic-1.0.3 .watchr
formnestic-1.0.2 .watchr
formnestic-1.0.1 .watchr
formnestic-1.0.0 .watchr