Sha256: b0c231daa6fbaa7a4c7cdf96a2530301c477fa2ef98f45ccc1241c0a2fd019ab
Contents?: true
Size: 685 Bytes
Versions: 8
Compression:
Stored size: 685 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "..", "test_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
8 entries across 8 versions & 2 rubygems