aboutsummaryrefslogtreecommitdiff
path: root/test/util.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/util.el')
-rw-r--r--test/util.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/util.el b/test/util.el
new file mode 100644
index 0000000..7d5937f
--- /dev/null
+++ b/test/util.el
@@ -0,0 +1,12 @@
+(defmacro stack-test-get-sample-data (method &optional directory)
+ (with-current-buffer
+ (find-file-noselect
+ (concat "data-samples/"
+ (when directory (concat directory "/"))
+ method ".el"))
+ (eval (read (buffer-string)))))
+
+(setq stack-test-data-questions
+ (stack-test-get-sample-data "questions")
+ stack-test-data-sites
+ (stack-test-get-sample-data "sites"))