test/test_tracker.rb in tracksperanto-2.9.6 vs test/test_tracker.rb in tracksperanto-2.9.7
- old
+ new
@@ -62,9 +62,18 @@
def test_supports_hash_init_with_keyframes
kfs = Tracksperanto::Keyframe.new(:frame => 1, :abs_x => 123, :abs_y => 456)
assert_equal [kfs], Tracksperanto::Tracker.new(:keyframes => [kfs]).keyframes
end
+ def test_clear
+ t = Tracksperanto::Tracker.new do | t |
+ t.keyframe! :abs_x => 123, :abs_y => 456
+ end
+ assert_equal 1, t.length
+ t.clear
+ assert t.length.zero?
+ end
+
def test_supports_array_methods
kfs = Tracksperanto::Keyframe.new(:frame => 1, :abs_x => 123, :abs_y => 456)
t = Tracksperanto::Tracker.new(:keyframes => [kfs])
assert_equal [kfs], t.to_a