Sha256: 0e41fe7f7cd9a992c8bc081c7c58cff2f7948abbea1e36fdaccfa90e114ce886

Contents?: true

Size: 769 Bytes

Versions: 4

Compression:

Stored size: 769 Bytes

Contents

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

class TestFlvEdit < Test::Unit::TestCase
  context "Options parsing" do
    setup do
      @options = FLV::Edit::Options.new([SHORT_FLV, "--Debug"])
    end
    
    should "detect files" do
      assert_equal [SHORT_FLV], @options.options[:files]
    end
    
  end
  
  context "Command line tool" do
    setup do
      File.delete(TEMP_FLV) if File.exist?(TEMP_FLV)
    end
    
    should "save" do
      assert !File.exist?(TEMP_FLV)
      runner = FLV::Edit::Runner.new([SHORT_FLV, "--Update", "--Save", TEMP_FLV])
      runner.options[:dont_catch_errors] = true
      runner.run
      assert File.exist?(TEMP_FLV)
    end
    
    teardown do
      File.delete(TEMP_FLV) if File.exist?(TEMP_FLV)
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

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