Sha256: 0b82b9b89d035e888d00fe32c405350e1eac5b54ced07ec3eb7608b386596584
Contents?: true
Size: 1.16 KB
Versions: 2
Compression:
Stored size: 1.16 KB
Contents
describe "Walt::AnimationSet" do describe "#assets=" do before do @set = Walt::AnimationSet.new end it "works with Assets" do asset = Walt::Asset.new(id: :hello, view: UIView.alloc.initWithFrame(CGRectZero)) @set.assets = [asset] @set.assets.is_a?(NSArray).should == true end it "works with hash" do asset = {id: :hello, view: UIView.alloc.initWithFrame(CGRectZero)} @set.assets = [asset] @set.assets.is_a?(NSArray).should == true end after do @set.assets.each {|value| value.is_a?(Walt::Asset).should == true } end end describe "#animations=" do before do @set = Walt::AnimationSet.new end it "works with Assets" do animation = Walt::Animation.new(delay: 0, duration: 3) @set.animations = [animation] @set.animations.is_a?(NSArray).should == true end it "works with hash" do animation = {delay: 0, duration: 3} @set.animations = [animation] @set.animations.is_a?(NSArray).should == true end after do @set.animations.each {|value| value.is_a?(Walt::Animation).should == true } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
walt-0.1.2 | spec/animation_set_spec.rb |
walt-0.1 | spec/animation_set_spec.rb |