Sha256: a1cad99d72051de4cc19e074d235c922e223e4de39ef3188f60a02c40cc0a175

Contents?: true

Size: 1.53 KB

Versions: 7

Compression:

Stored size: 1.53 KB

Contents

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

class TracksperantoTest < Test::Unit::TestCase
  def test_middlewares
    m = Tracksperanto.middlewares
    m.each do | middleware_module |
      assert_kind_of Module, middleware_module
    end
  end

  def test_exporters
    m = Tracksperanto.exporters
    m.each do | x |
      assert_kind_of Class, x
    end
  end
  
  def test_importers
    m = Tracksperanto.importers
    m.each do | x |
      assert_kind_of Class, x
    end
  end
  
  def test_middleware_names
    m = Tracksperanto.middleware_names
    assert m.include?("Golden")
  end
  
  def test_importer_names
    m = Tracksperanto.importer_names
    assert m.include?("FlameStabilizer")
  end
  
  def test_exporter_names
    m = Tracksperanto.exporter_names
    assert m.include?("PFTrack5")
  end
  
  def test_get_importer
    i1 = Tracksperanto.get_importer("syntheyes")
    assert_equal i1, Tracksperanto::Import::Syntheyes
  end
  
  def test_get_importer_multicase
    i1 = Tracksperanto.get_importer("ShakeScript")
    assert_equal i1, Tracksperanto::Import::ShakeScript
  end

  def test_get_exporter
    i1 = Tracksperanto.get_exporter("syntheyes")
    assert_equal i1, Tracksperanto::Export::SynthEyes
    
    i1 = Tracksperanto.get_exporter("SynThEyes")
    assert_equal i1, Tracksperanto::Export::SynthEyes
    
    i1 = Tracksperanto.get_exporter("SynthEyes")
    assert_equal i1, Tracksperanto::Export::SynthEyes
  end
  
  def test_get_unknown_exporter_should_raise
    assert_raise(NameError) { Tracksperanto.get_exporter("foo") }
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tracksperanto-1.8.4 test/test_tracksperanto.rb
tracksperanto-1.8.2 test/test_tracksperanto.rb
tracksperanto-1.8.1 test/test_tracksperanto.rb
tracksperanto-1.8.0 test/test_tracksperanto.rb
tracksperanto-1.7.5 test/test_tracksperanto.rb
tracksperanto-1.7.4 test/test_tracksperanto.rb
tracksperanto-1.7.3 test/test_tracksperanto.rb