Sha256: 7ef97da640de2dabcf77df0c1c033a4d6d03d68b8b2a8aaeee1f0e0ac24a69e9

Contents?: true

Size: 1.1 KB

Versions: 26

Compression:

Stored size: 1.1 KB

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class ReformatToolTest < Test::Unit::TestCase
  
  def test_action_description
    assert_equal "Reformat the comp together with it's trackers to conform to a specific format", Tracksperanto::Tool::Reformat.action_description
  end
  
  def test_default_params_zeroed
    receiver = flexmock
    m = Tracksperanto::Tool::Reformat.new(receiver)
    assert_equal 0, m.width
    assert_equal 0, m.height
  end
  
  def test_reformat_supports_hash_init
    receiver = flexmock
    m = Tracksperanto::Tool::Reformat.new(receiver, :width => 1920, :height => 1080)
    assert_equal 1920, m.width
    assert_equal 1080, m.height
  end
  
  def test_reformat_bypasses_methods_and_sets_aspect
    upscale_h =  2.66666666666667
    upscale_v =  1.875
    
    receiver = flexmock
    receiver.should_receive(:start_export).once.with(1920,1080)
    receiver.should_receive(:end_export).once
    
    m = Tracksperanto::Tool::Reformat.new(receiver, :width => 1920, :height => 1080)
    
    m.start_export(720, 576)
    m.end_export
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
tracksperanto-3.5.9 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.8 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.7 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.6 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.5 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.4 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.2 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.1 test/tools/test_reformat_middleware.rb
tracksperanto-3.5.0 test/tools/test_reformat_middleware.rb
tracksperanto-3.4.1 test/tools/test_reformat_middleware.rb
tracksperanto-3.4.0 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.13 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.12 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.11 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.10 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.9 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.8 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.7 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.6 test/tools/test_reformat_middleware.rb
tracksperanto-3.3.0.pre test/tools/test_reformat_middleware.rb