summaryrefslogtreecommitdiff
path: root/test/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 23ff39a..3f85b7a 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -2,3 +2,11 @@ require "rubygems"
require 'test/unit'
require 'activesupport' # for HashWithIndifferentAccess
require File.expand_path(File.dirname(__FILE__) + '/../lib/ruby-srp.rb')
+
+class Test::Unit::TestCase
+ def fixture(filename)
+ path = File.expand_path("../fixtures/#{filename}.json", __FILE__)
+ HashWithIndifferentAccess[JSON.parse(File.read(path))]
+ end
+end
+