File: .autotest

package info (click to toggle)
ruby-fakeweb 1.3.0+git20170806+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 436 kB
  • sloc: ruby: 2,057; sh: 24; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'autotest/bundler'
require 'autotest/restart'

# Let child processes know that they're running under autotest,
# so they can disable test-coverage reporting, etc.
ENV["AUTOTEST"] = "1"

Autotest.add_hook :initialize do |autotest|
  autotest.order = :random

  %w(.git coverage log vendor).each do |directory|
    autotest.add_exception(directory)
  end

  # Our tests are fast enough that it's reasonable to just run 'em all
  # whenever something changes
  autotest.clear_mappings
  autotest.add_mapping /^Gemfile|^Rakefile|\.gemspec$|\.rb$/ do
    autotest.files_matching %r|^test/test_\w+\.rb$|
  end
end

Autotest.add_hook :run_command do |at|
  system "bundle exec rake test:preflight"
end