Sha256: e392de835dd4f3c897ac029f5df841e59d014d2ce0626664f16f5bfcb0d4d1d9

Contents?: true

Size: 596 Bytes

Versions: 2

Compression:

Stored size: 596 Bytes

Contents

require 'spec_helper'

describe RspecLogFormatter::HistoryManager do
  it "can truncate the log file" do
    filepath = File.expand_path("../../../fixtures/test_was_flaky_then_fixed.history", __FILE__)
    temp = Tempfile.new('fixture')
    FileUtils.copy(filepath, temp.path)
    RspecLogFormatter::HistoryManager.new(temp.path).truncate(3)
    File.open(temp.path, 'r').read.should == <<HEREDOC
5	2014-01-21 16:08:25 -0800	passed	desc	./spec/m1k1_spec.rb
6	2014-01-21 16:08:25 -0800	passed	desc	./spec/m1k1_spec.rb
7	2014-01-21 16:08:25 -0800	passed	desc	./spec/m1k1_spec.rb
HEREDOC
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec_log_formatter-0.2.1 spec/lib/rspec_log_analyzer/history_manager_spec.rb
rspec_log_formatter-0.2.0 spec/lib/rspec_log_analyzer/history_manager_spec.rb