mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-15 07:23:19 -04:00
Added autotest support and added colorized output of tests
This commit is contained in:
committed by
Jim Weirich
parent
bc1a20a310
commit
06c47eb284
3
koans/autotest/discover.rb
Normal file
3
koans/autotest/discover.rb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Autotest.add_discovery do
|
||||||
|
"rubykoan" if File.exist? 'path_to_enlightenment.rb'
|
||||||
|
end
|
||||||
24
koans/autotest/rubykoan.rb
Normal file
24
koans/autotest/rubykoan.rb
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
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
|
||||||
|
|
||||||
Reference in New Issue
Block a user