Sha256: 7822e38f6cedf7c6169ca86cd9309f62c60201a54fff1a339d89e657558deb89
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
describe "Walt::Operation::MoveOperation" do before do @view = UIView.alloc.initWithFrame([[100,100], [50,50]]) end describe "#setup" do describe "with one param" do it "should work" do op = Walt::Operation.for(type: :move, id: :herp, from: 0) op.setup(@view, nil) @view.origin.x.should == 0 end end describe "with array" do it "should work" do op = Walt::Operation.for(type: :move, id: :herp, from: [200, 200]) op.setup(@view, nil) @view.origin.x.should == 200 @view.origin.y.should == 200 end end end describe "#finalize" do describe "with one param" do it "should work" do op = Walt::Operation.for(type: :move, id: :herp, to: 200) op.finalize(@view, nil) @view.origin.x.should == 200 end end describe "with array" do it "should work" do op = Walt::Operation.for(type: :move, id: :herp, to: [200, 200]) op.finalize(@view, nil) @view.origin.x.should == 200 @view.origin.y.should == 200 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
walt-0.1.2 | spec/operation/move_spec.rb |
walt-0.1 | spec/operation/move_spec.rb |