Sha256: b5e40a58fd756557b83338ccf69c4be82b7f74769f8b458d6d6e0bd089b3d27b
Contents?: true
Size: 1.05 KB
Versions: 23
Compression:
Stored size: 1.05 KB
Contents
require File.expand_path(File.dirname(__FILE__)) + '/../helper' class ReformatMiddlewareTest < Test::Unit::TestCase def test_inherits_and_thus_complies assert Tracksperanto::Middleware::Reformat.ancestors.include?(Tracksperanto::Middleware::Base) end def test_default_params_zeroed receiver = flexmock m = Tracksperanto::Middleware::Reformat.new(receiver) assert_equal 0, m.width assert_equal 0, m.height end def test_reformat_supports_hash_init receiver = flexmock m = Tracksperanto::Middleware::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::Middleware::Reformat.new(receiver, :width => 1920, :height => 1080) m.start_export(720, 576) m.end_export end end
Version data entries
23 entries across 23 versions & 1 rubygems