Sha256: 3e1b2b8de42f2e19eb598efd4502c3fe064c649b002a8070ac36627c7c4516a8
Contents?: true
Size: 635 Bytes
Versions: 11
Compression:
Stored size: 635 Bytes
Contents
require "spec_helper" 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
11 entries across 11 versions & 2 rubygems