spec/lib/helpers.rb in request-log-analyzer-1.4.0 vs spec/lib/helpers.rb in request-log-analyzer-1.4.0.1
- old
+ new
@@ -8,9 +8,14 @@
# Load a log file from the fixture folder
def log_fixture(name, extention = "log")
File.dirname(__FILE__) + "/../fixtures/#{name}.#{extention}"
end
+ # Creates a log file given some lines
+ def log_stream(*lines)
+ StringIO.new(lines.join("\n") + "\n")
+ end
+
# Request loopback
def request(fields, format = testing_format)
if fields.kind_of?(Array)
format.request(*fields)
else