summaryrefslogtreecommitdiff
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-08-05 15:11:33 -0700
committerelijah <elijah@riseup.net>2014-08-05 15:11:33 -0700
commitb76d1bcc4d135f0d46a1f5daa54a0faa939cfd20 (patch)
treeeaf766b279a5fd69899b665adea0ca433b37d9d5 /test/test_helper.rb
parent4af55c774c0d47462fffe0600c8204bbc23224ed (diff)
added kkp_ca_file config option
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index d6eabe5..7fbe400 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -19,7 +19,11 @@ class Minitest::Test
end
def file_content(filename)
- (@file_contents ||= {})[filename] ||= File.read("%s/files/%s" % [File.dirname(__FILE__), filename])
+ (@file_contents ||= {})[filename] ||= File.read(file_path(filename))
+ end
+
+ def file_path(filename)
+ "%s/files/%s" % [File.dirname(__FILE__), filename]
end
def real_network
@@ -54,4 +58,11 @@ class Minitest::Test
end
end
+ #
+ # temporarily stubs the config property for the duration of the given block
+ #
+ def stub_config(property, value, &block)
+ Nickserver::Config.stub(property, value, &block)
+ end
+
end