Sha256: 0f1ace6af89308e050925d2df9a7a95416bb71f1b8aee0694ec8aca132805603

Contents?: true

Size: 923 Bytes

Versions: 42

Compression:

Stored size: 923 Bytes

Contents

describe MotionKit::Parent do

  before do
    uiview = UIView.new
    uiview.frame = [[10, 20], [30, 40]]
    @subject = MotionKit::Parent.new(uiview)
  end

  it "should return the x value" do
    @subject.x.should == 10
  end

  it "should return the y value" do
    @subject.y.should == 20
  end

  it "should return the width value" do
    @subject.width.should == 30
  end

  it "should return the height value" do
    @subject.height.should == 40
  end

  it "should return the center_x value" do
    @subject.center_x.should == 15
  end

  it "should return the center_y value" do
    @subject.center_y.should == 20
  end

  it "should return the center point" do
    @subject.center.should == CGPointMake(15, 20)
  end

  it "should return the origin point" do
    @subject.origin.should == CGPointMake(10, 20)
  end

  it "should return the size rect" do
    @subject.size.should == CGSizeMake(30, 40)
  end

end

Version data entries

42 entries across 36 versions & 1 rubygems

Version Path
motion-kit-1.1.1 spec/tvos/parent_spec.rb
motion-kit-1.1.1 spec/ios/parent_spec.rb
motion-kit-1.1.0 spec/tvos/parent_spec.rb
motion-kit-1.1.0 spec/ios/parent_spec.rb
motion-kit-1.0.3 spec/tvos/parent_spec.rb
motion-kit-1.0.3 spec/ios/parent_spec.rb
motion-kit-1.0.2 spec/ios/parent_spec.rb
motion-kit-1.0.2 spec/tvos/parent_spec.rb
motion-kit-1.0.1 spec/ios/parent_spec.rb
motion-kit-1.0.1 spec/tvos/parent_spec.rb
motion-kit-1.0.0 spec/tvos/parent_spec.rb
motion-kit-1.0.0 spec/ios/parent_spec.rb
motion-kit-0.18.0 spec/ios/parent_spec.rb
motion-kit-0.17.0 spec/ios/parent_spec.rb
motion-kit-0.16.0 spec/ios/parent_spec.rb
motion-kit-0.15.0 spec/ios/parent_spec.rb
motion-kit-0.14.2 spec/ios/parent_spec.rb
motion-kit-0.14.1 spec/ios/parent_spec.rb
motion-kit-0.14.0 spec/ios/parent_spec.rb
motion-kit-0.13.0 spec/ios/parent_spec.rb