sugarcube 0.18.7 → 0.18.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,7 @@ class UIView
44
44
  delay = options[:delay] || 0
45
45
  if duration == 0 && delay == 0
46
46
  animations.call
47
- after_adjusted.call(true)
47
+ after_adjusted.call(true) if after_adjusted
48
48
  else
49
49
  UIView.animateWithDuration( duration,
50
50
  delay: delay,
@@ -1,3 +1,3 @@
1
1
  module SugarCube
2
- Version = '0.18.7'
2
+ Version = '0.18.8'
3
3
  end
@@ -54,4 +54,13 @@ describe "UIView animation methods" do
54
54
  @after_called.should == true
55
55
  end
56
56
 
57
+ it 'should not animate if duration is 0, and after: is not required' do
58
+ @after_called = false
59
+ UIView.animate(duration: 0.0) {
60
+ @view.frame = [[0, 0], [0, 0]]
61
+ @after_called = true
62
+ }
63
+ @after_called.should == true
64
+ end
65
+
57
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugarcube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.7
4
+ version: 0.18.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: