test/import/test_flame_import.rb in tracksperanto-2.1.1 vs test/import/test_flame_import.rb in tracksperanto-2.2.0

- old
+ new

@@ -84,13 +84,13 @@ end def test_parsing_from_flame fixture = File.open(File.dirname(__FILE__) + '/samples/flame_stabilizer/hugeFlameSetup.stabilizer') - parser = Tracksperanto::Import::FlameStabilizer.new + parser = Tracksperanto::Import::FlameStabilizer.new(:io => fixture) + trackers = parser.to_a - trackers = parser.parse(fixture) assert_equal 2048, parser.width assert_equal 1176, parser.height parser.height = 1080 @@ -113,25 +113,25 @@ end def test_parsing_another_track fixture = File.open(File.dirname(__FILE__) + '/samples/flame_stabilizer/megaTrack.action.3dtrack.stabilizer') - parser = Tracksperanto::Import::FlameStabilizer.new + parser = Tracksperanto::Import::FlameStabilizer.new(:io => fixture) + trackers = parser.to_a - trackers = parser.parse(fixture) assert_equal 1920, parser.width assert_equal 1080, parser.height assert_equal 20, trackers.length end def test_simple_from_combustion fixture = File.open(File.dirname(__FILE__) + '/samples/flame_stabilizer/fromCombustion_fromMidClip_wSnap.stabilizer') - parser = Tracksperanto::Import::FlameStabilizer.new + parser = Tracksperanto::Import::FlameStabilizer.new(:io => fixture) + trackers = parser.to_a - trackers = parser.parse(fixture) assert_equal 1280, parser.width assert_equal 540, parser.height assert_equal 1, trackers.length @@ -149,11 +149,12 @@ assert_in_delta 280.248, frame_149.abs_y, DELTA end def test_from_tracksperanto fixture = File.open(File.dirname(__FILE__) + '/samples/flame_stabilizer/fromTracksperanto.stabilizer') - parser = Tracksperanto::Import::FlameStabilizer.new - trackers = parser.parse(fixture) + parser = Tracksperanto::Import::FlameStabilizer.new(:io => fixture) + trackers = parser.to_a + assert_equal 3, trackers.length assert_equal 3, trackers[0].length end end \ No newline at end of file