Rake's Test/Unit runner be damned
This commit is contained in:
parent
295e41c245
commit
0d81292168
9
test/all_tests.rb
Normal file
9
test/all_tests.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
require 'test_helper'
|
||||||
|
require 'find'
|
||||||
|
|
||||||
|
test_root = File.dirname(__FILE__)
|
||||||
|
Find.find(test_root) { |path|
|
||||||
|
if File.file?(path) and path =~ /.*_test\.rb$/
|
||||||
|
require path[(test_root.size + 1)..-4]
|
||||||
|
end
|
||||||
|
}
|
|
@ -4,13 +4,13 @@ require File.dirname(__FILE__) + '/../test_helper'
|
||||||
require 'web'
|
require 'web'
|
||||||
require 'page'
|
require 'page'
|
||||||
|
|
||||||
class MockWeb < Web
|
class PageTest < Test::Unit::TestCase
|
||||||
|
|
||||||
|
class MockWeb < Web
|
||||||
def initialize() super('test','test') end
|
def initialize() super('test','test') end
|
||||||
def [](wiki_word) %w( MyWay ThatWay SmartEngine ).include?(wiki_word) end
|
def [](wiki_word) %w( MyWay ThatWay SmartEngine ).include?(wiki_word) end
|
||||||
def refresh_pages_with_references(name) end
|
def refresh_pages_with_references(name) end
|
||||||
end
|
end
|
||||||
|
|
||||||
class PageTest < Test::Unit::TestCase
|
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@page = Page.new(
|
@page = Page.new(
|
||||||
|
@ -18,8 +18,7 @@ class PageTest < Test::Unit::TestCase
|
||||||
"FirstPage",
|
"FirstPage",
|
||||||
"HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \\OverThere -- see SmartEngine in that SmartEngineGUI",
|
"HisWay would be MyWay in kinda ThatWay in HisWay though MyWay \\OverThere -- see SmartEngine in that SmartEngineGUI",
|
||||||
Time.local(2004, 4, 4, 16, 50),
|
Time.local(2004, 4, 4, 16, 50),
|
||||||
"DavidHeinemeierHansson"
|
"DavidHeinemeierHansson")
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_lock
|
def test_lock
|
||||||
|
|
Loading…
Reference in a new issue