Sha256: 40ded704cdb5771bf81bfaebcc4b5dca0cba2c9ff8a22c2ea9927a6f924950c6

Contents?: true

Size: 904 Bytes

Versions: 4

Compression:

Stored size: 904 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class TestFlvEdit < Test::Unit::TestCase
  context "Command line results" do
    Dir.glob(File.dirname(__FILE__)+"/text_flv_edit_results/*.txt").each do |fn|
      sep, args, sep, *expect = File.readlines(fn).map!(&:chomp)
      args = args.split(' ')
      args.unshift SHORT_FLV unless args.first.start_with?(".")
      
      context "for 'flvedit #{args.join(' ')}'" do
        setup do
          Time.stubs(:now).returns(Time.utc(2008,"dec",20))
          @result = ""
          runner = FLV::Edit::Runner.new(args)
          runner.options[:dont_catch_errors] = true
          runner.options[:out] = StringIO.new(@result)
          runner.run
        end
        should "match #{fn}" do
          @result = @result.split("\n")
          same = @result & expect
          assert_equal expect-same, @result-same
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
marcandre-flvedit-0.6.1 test/test_flv_edit_results.rb
marcandre-flvedit-0.6.2 test/test_flv_edit_results.rb
flvedit-0.6.1 test/test_flv_edit_results.rb
flvedit-0.6.2 test/test_flv_edit_results.rb