Sha256: f81f6bc56932f9c4d76b53581b646f4c2a50abe1cc72d7c0771e82989a9f9df5

Contents?: true

Size: 648 Bytes

Versions: 19

Compression:

Stored size: 648 Bytes

Contents

describe NSIndexPath do

  it 'should have to_a' do
    path = NSIndexPath.indexPathWithIndex(1).indexPathByAddingIndex(3)
    path.to_a.should == [1, 3]
  end

  it 'should have to_ary' do
    a, b = NSIndexPath.indexPathWithIndex(1).indexPathByAddingIndex(3)
    a.should == 1
    b.should == 3
  end

  it 'should support indexPathForRow(inSection:)' do
    path = NSIndexPath.indexPathForRow(1, inSection: 3).to_a
    path[0].should == 3
    path[1].should == 1
  end

  it 'should support indexPathForItem(inSection:)' do
    path = NSIndexPath.indexPathForItem(1, inSection: 3).to_a
    path[0].should == 3
    path[1].should == 1
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
sugarcube-3.3.6 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.3.5 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.3.4 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.3.3 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.3.2 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.3.1 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.3.0 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.2.0 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.1.1 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.1.0 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.8 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.7 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.6 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.5 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.4 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.3 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.2 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.1 spec/cocoa/nsindexpath_spec.rb
sugarcube-3.0.0 spec/cocoa/nsindexpath_spec.rb