Sha256: 71e6dda58a294008fd6089c2f68507368ce7fd2fc690833ab11b12ed0067181b

Contents?: true

Size: 701 Bytes

Versions: 5

Compression:

Stored size: 701 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/tinman/(.*)\.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

5 entries across 5 versions & 1 rubygems

Version Path
tinman-0.5.0 test/autotest.rb
tinman-0.4.0 test/autotest.rb
tinman-0.3.0 test/autotest.rb
tinman-0.2.0 test/autotest.rb
tinman-0.1.0 test/autotest.rb