spec/ios/animation_chain_spec.rb in sugarcube-2.8.2 vs spec/ios/animation_chain_spec.rb in sugarcube-2.9.1

- old
+ new

@@ -22,9 +22,23 @@ @did_run_2.should == true @did_run_3.should == true end end + it "should not leak memory" do + chain = UIView.animation_chain(duration:0.01){ + f = controller.view.frame + f.origin.x -= 20 + controller.view.frame = f + }.start + + wait 0.1 do + weak = WeakRef.new(chain) + chain = nil + weak.weakref_alive?.should == false + end + end + it "should support chains" do SugarCube::AnimationChain.chains.length.should == 0 @variable_a = nil @variable_b = nil UIView.animation_chain(duration:0.1){