Sha256: ea3c69c59f1610f64c7b1dee082cd562765cdf0470282fc556ed7772e8a8020c

Contents?: true

Size: 681 Bytes

Versions: 2

Compression:

Stored size: 681 Bytes

Contents

require 'json'
require 'spec_helper'

describe 'Fluent::Rubyprof' do
  CONFIG_PATH = File.join(File.dirname(__FILE__), 'fluent.conf')
  BIN_DIR = File.join(ROOT, 'bin')
  OUTPUT_FILE = File.join(File.dirname(__FILE__), 'test.txt')

  before :all do
    @fluentd_pid = spawn('fluentd', '-c', CONFIG_PATH, out: '/dev/null')
    sleep 2

    system("#{File.join(BIN_DIR, 'fluent-rubyprof')} start")
    sleep 2

    system("#{File.join(BIN_DIR, 'fluent-rubyprof')} stop -o #{OUTPUT_FILE}")
    sleep 1
  end

  after :all do
    Process.kill(:TERM, @fluentd_pid)
    Process.waitall
  end

  it 'outputs profiling result' do
    expect(File.size?(OUTPUT_FILE)).to be_truthy
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-rubyprof-0.0.2 spec/fluent-rubyprof/rubyprof_spec.rb
fluent-rubyprof-0.0.1 spec/fluent-rubyprof/rubyprof_spec.rb