summaryrefslogtreecommitdiffstats
path: root/tests/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_helper.rb')
-rw-r--r--tests/test_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_helper.rb b/tests/test_helper.rb
index cf67576..c55e1f4 100644
--- a/tests/test_helper.rb
+++ b/tests/test_helper.rb
@@ -29,4 +29,17 @@ class Test::Unit::TestCase
FileUtils.rm_r(tmp_path) if remove_after
end
+
+ def new_file(name, contents)
+ File.open(name, 'w') do |f|
+ f.puts contents
+ end
+ end
+
+ def append_file(name, contents)
+ File.open(name, 'a') do |f|
+ f.puts contents
+ end
+ end
+
end \ No newline at end of file