Sha256: ae226c7398d8516cefa242d1e3bf3b2fb8ab61c93b1a18885f3460a1c596b399

Contents?: true

Size: 699 Bytes

Versions: 54

Compression:

Stored size: 699 Bytes

Contents

#
# Convenience Methods
#
def run(cmd)
  print "\n\n"
  puts(cmd)
  system(cmd)
  print "\n\n"
end

def run_all_tests
  # see Rakefile for the definition of the test:all task
  system("rake -s test:all VERBOSE=true")
end

#
# Watchr Rules
#
watch('^test/.*?_test\.rb'   ) {|m| run("ruby -rubygems %s"              % m[0]) }
watch('^lib/(.*)\.rb'        ) {|m| run("ruby -rubygems test/%s_test.rb" % m[1]) }
watch('^lib/toto/(.*)\.rb'   ) {|m| run("ruby -rubygems test/%s_test.rb" % m[1]) }
watch('^test/test_helper\.rb') { run_all_tests }

#
# Signal Handling
#
# Ctrl-\
Signal.trap('QUIT') do
  puts " --- Running all tests ---\n\n"
  run_all_tests
end

# Ctrl-C
Signal.trap('INT') { abort("\n") }

Version data entries

54 entries across 54 versions & 11 rubygems

Version Path
toto-0.2.6 test/autotest.rb
toto-0.2.5 test/autotest.rb
toto-0.2.4 test/autotest.rb
toto-0.2.3 test/autotest.rb
toto-0.2.2 test/autotest.rb
toto-0.2.1 test/autotest.rb
toto-0.2.0 test/autotest.rb
toto-0.1.6 test/autotest.rb
toto-0.1.5 test/autotest.rb
toto-0.1.4 test/autotest.rb
toto-0.1.3 test/autotest.rb
toto-0.1.2 test/autotest.rb
toto-0.1.1 test/autotest.rb
toto-0.1.0 test/autotest.rb