Sha256: 73a088ac2c05dc37dd6fe445f3e9c3352f1d158384f76d93ffb22f6548750fd1
Contents?: true
Size: 692 Bytes
Versions: 3
Compression:
Stored size: 692 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "..", "test_helper.rb") include Relevance::Tarantula describe 'Relevance::Tarantula::LogGrabber' do before do @grabber = 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
3 entries across 3 versions & 1 rubygems