spec/spec_helper.rb in fluent-plugin-elb-access-log-0.4.0 vs spec/spec_helper.rb in fluent-plugin-elb-access-log-0.4.1

- old
+ new

@@ -45,10 +45,21 @@ def driver_run(driver) driver.run do coolio_loop = driver.instance.instance_variable_get(:@loop) sleep 0.1 until coolio_loop.instance_variable_get(:@running) + sleep 0.1 end +end + +def gzip(str) + io = StringIO.new + + Zlib::GzipWriter.wrap(io) do |gz| + gz << str + end + + io.string end # prevent Test::Unit's AutoRunner from executing during RSpec's rake task # ref: https://github.com/rspec/rspec-rails/issues/1171 Test::Unit.run = true if defined?(Test::Unit) && Test::Unit.respond_to?(:run=)