Sha256: 9f258b03438e5edc680d6756b1527bafe35f137f3a5b8b77057be9e0e367ea14
Contents?: true
Size: 1.06 KB
Versions: 20
Compression:
Stored size: 1.06 KB
Contents
describe "PM::Table utils" do before do @subject = TestTableScreen.new @subject.on_load @subject.update_table_data end it "should convert an index path to a section index" do index_path = NSIndexPath.indexPathForRow(12, inSection:2) given = {index_path: index_path} expected = { index_path: index_path, section: 2, index: 12 } @subject.index_path_to_section_index(given).should == expected end it "return the original param when converting an index path with incorrect values" do @subject.index_path_to_section_index(17).should == 17 end it "should properly determine if all members of an array are the same class" do @subject.array_all_members_of?([1, 2, 3, 4], Fixnum).should == true @subject.array_all_members_of?(["string", 'string2'], String).should == true @subject.array_all_members_of?([:sym1, :sym2, :sym3], Symbol).should == true @subject.array_all_members_of?([1, 2, 3, 4, 'String'], Fixnum).should == false @subject.array_all_members_of?([4.4, 2], Fixnum).should == false end end
Version data entries
20 entries across 20 versions & 1 rubygems