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-0.12.0 spec/ios/parent_spec.rb
motion-kit-0.11.2 spec/ios/parent_spec.rb
motion-kit-0.11.1 spec/ios/parent_spec.rb
motion-kit-0.11.0 spec/ios/parent_spec.rb
motion-kit-0.10.11 spec/ios/parent_spec.rb
motion-kit-0.10.10 spec/ios/parent_spec.rb
motion-kit-0.10.9 spec/ios/parent_spec.rb
motion-kit-0.10.8 spec/ios/parent_spec.rb
motion-kit-0.10.7 spec/ios/parent_spec.rb
motion-kit-0.10.6 spec/ios/parent_spec.rb
motion-kit-0.10.5 spec/ios/parent_spec.rb
motion-kit-0.10.4 spec/ios/parent_spec.rb
motion-kit-0.10.3 spec/ios/parent_spec.rb
motion-kit-0.10.2 spec/ios/parent_spec.rb
motion-kit-0.10.1 spec/ios/parent_spec.rb
motion-kit-0.10.0 spec/ios/parent_spec.rb
motion-kit-0.9.6 spec/ios/parent_spec.rb
motion-kit-0.9.4 spec/ios/parent_spec.rb
motion-kit-0.9.3 spec/ios/parent_spec.rb
motion-kit-0.9.2 spec/ios/parent_spec.rb