test/test_pipeline.rb in tracksperanto-2.9.4 vs test/test_pipeline.rb in tracksperanto-2.9.5

- old
+ new

@@ -1,9 +1,9 @@ # -*- encoding : utf-8 -*- require File.expand_path(File.dirname(__FILE__)) + '/helper' -class PipelineTest < Test::Unit::TestCase +class TestPipeline < Test::Unit::TestCase def setup @old_dir = Dir.pwd Dir.chdir(File.dirname(__FILE__)) super @@ -55,9 +55,16 @@ assert_nothing_raised { pipeline.run(@stabilizer) } assert processing_log.include?("Parsing the file") assert processing_log.include?("Parsing channel \"tracker1/ref/y\"") end + def test_run_returns_the_number_of_trackers_and_keyframes_processed + create_stabilizer_file + pipeline = Tracksperanto::Pipeline::Base.new + result = pipeline.run(@stabilizer) + assert_equal [3, 9], result + end + def test_run_crashes_with_empty_file empty_file_path = "./input_empty.stabilizer" f = File.open(empty_file_path, "w"){|f| f.write('') } pipeline = Tracksperanto::Pipeline::Base.new assert_raise(Tracksperanto::Pipeline::EmptySourceFileError) { pipeline.run(empty_file_path) }