require File.join(File.dirname(__FILE__), 'test_helper') class LogFileTest < Test::Unit::TestCase include SproutTestCase context "A LogFile" do setup do @logger = StringIO.new @flashlog = File.join(fixtures, 'flashlog.txt') @reader = FlashPlayer::LogFile.new @reader.logger = @logger @reader.stubs(:flashlog_path).returns @flashlog FileUtils.touch @flashlog end teardown do remove_file @flashlog end should "read until killed" do blocked = true t = Thread.new { @reader.tail blocked = false } assert blocked t.kill end end end