mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-15 07:23:19 -04:00
Merge pull request #70 from saterus/master
Switch from Autotest to Watchr
This commit is contained in:
2
Rakefile
Normal file → Executable file
2
Rakefile
Normal file → Executable file
@@ -42,8 +42,6 @@ module Koans
|
|||||||
def Koans.make_koan_file(infile, outfile)
|
def Koans.make_koan_file(infile, outfile)
|
||||||
if infile =~ /edgecase/
|
if infile =~ /edgecase/
|
||||||
cp infile, outfile
|
cp infile, outfile
|
||||||
elsif infile =~ /autotest/
|
|
||||||
cp_r infile, outfile
|
|
||||||
else
|
else
|
||||||
open(infile) do |ins|
|
open(infile) do |ins|
|
||||||
open(outfile, "w") do |outs|
|
open(outfile, "w") do |outs|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
Autotest.add_discovery do
|
|
||||||
"rubykoan" if File.exist? 'path_to_enlightenment.rb'
|
|
||||||
end
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
require 'autotest'
|
|
||||||
|
|
||||||
class Autotest::Rubykoan < Autotest
|
|
||||||
def initialize
|
|
||||||
super
|
|
||||||
@exceptions = /\.txt|Rakefile|\.rdoc/
|
|
||||||
|
|
||||||
self.order = :alpha
|
|
||||||
self.add_mapping(/^about_.*rb$/) do |filename, _|
|
|
||||||
filename
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
def make_test_cmd files_to_test
|
|
||||||
"#{ruby} 'path_to_enlightenment.rb'"
|
|
||||||
end
|
|
||||||
|
|
||||||
# quiet test/unit chatter
|
|
||||||
def handle_results(results)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
3
src/koans.watchr
Normal file
3
src/koans.watchr
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
watch( '.*\.rb' ) do
|
||||||
|
system 'rake'
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user