mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-08 13:45:28 -05:00
Using a test_dir helper method for tests.
This commit is contained in:
@@ -28,17 +28,21 @@ class Test::Unit::TestCase
|
||||
include RR::Adapters::TestUnit
|
||||
|
||||
def dest_dir(*subdirs)
|
||||
File.join(File.dirname(__FILE__), 'dest', *subdirs)
|
||||
test_dir('dest', *subdirs)
|
||||
end
|
||||
|
||||
def source_dir(*subdirs)
|
||||
File.join(File.dirname(__FILE__), 'source', *subdirs)
|
||||
test_dir('source', *subdirs)
|
||||
end
|
||||
|
||||
def clear_dest
|
||||
FileUtils.rm_rf(dest_dir)
|
||||
end
|
||||
|
||||
def test_dir(*subdirs)
|
||||
File.join(File.dirname(__FILE__), *subdirs)
|
||||
end
|
||||
|
||||
def capture_stdout
|
||||
$old_stdout = $stdout
|
||||
$stdout = StringIO.new
|
||||
|
||||
Reference in New Issue
Block a user