spec/spec_helper.rb in triviacrack-0.5.1 vs spec/spec_helper.rb in triviacrack-0.6.0
- old
+ new
@@ -31,9 +31,13 @@
require_relative "../lib/triviacrack/parsers/user_parser"
class SpecData
def self.get(filename)
+ File.read(File.expand_path("../data/#{filename}", __FILE__))
+ end
+
+ def self.get_json(filename)
file = File.read(File.expand_path("../data/#{filename}", __FILE__))
JSON.parse(file)
end
end