Sha256: a9a3bcbe254affc58e3a31ab576c4961393692e56a06f39ff309bfdf6b88105e

Contents?: true

Size: 706 Bytes

Versions: 14

Compression:

Stored size: 706 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "example_helper.rb"))

describe 'Relevance::Tarantula::LogGrabber' do
  before do
    @grabber = Relevance::Tarantula::LogGrabber.new(log_file)
    FileUtils.mkdir_p(test_output_dir)
  end

  def log_file
    File.join(File.join(test_output_dir, "example.log"))
  end

  it "can clear the log file" do
    File.open(log_file, "w") {|f| f.print "sample log"}
    File.size(log_file).should == 10
    @grabber.clear!
    File.size(log_file).should == 0
  end

  it "can grab the log file" do
    File.open(log_file, "w") {|f| f.print "sample log"}
    @grabber.grab!.should == "sample log"
    File.size(log_file).should == 0
  end

end

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
relevance-tarantula-0.1.6 examples/relevance/tarantula/log_grabber_example.rb
relevance-tarantula-0.1.7 examples/relevance/tarantula/log_grabber_example.rb
relevance-tarantula-0.1.8 examples/relevance/tarantula/log_grabber_example.rb
relevance-tarantula-0.2.0 examples/relevance/tarantula/log_grabber_example.rb
relevance-tarantula-0.2.1 examples/relevance/tarantula/log_grabber_example.rb
relevance-tarantula-0.3.2 examples/relevance/tarantula/log_grabber_example.rb
relevance-tarantula-0.3.3 examples/relevance/tarantula/log_grabber_example.rb
romanbsd-tarantula-0.1.8 examples/relevance/tarantula/log_grabber_example.rb
romanbsd-tarantula-0.2.0 examples/relevance/tarantula/log_grabber_example.rb
tarantula-rails3-0.3.3 examples/relevance/tarantula/log_grabber_example.rb
panmind-tarantula-0.3.3 examples/relevance/tarantula/log_grabber_example.rb
tarantula-0.3.3 examples/relevance/tarantula/log_grabber_example.rb
tarantula-0.2.0 examples/relevance/tarantula/log_grabber_example.rb
tarantula-0.1.8 examples/relevance/tarantula/log_grabber_example.rb