spec/unit/tables/table_indexable_spec.rb in ProMotion-2.0.0.rc4 vs spec/unit/tables/table_indexable_spec.rb in ProMotion-2.0.0.rc5
- old
+ new
@@ -9,9 +9,22 @@
@screen.sectionIndexTitlesForTableView(@screen.table_view).should == result
end
end
+describe "PM::Table module indexable with nil section title" do
+
+ before do
+ @screen = TableScreenIndexableNil.new
+ end
+
+ it "should not crash when a section title is nil" do
+ result = %w{ A G M O S U }
+ @screen.sectionIndexTitlesForTableView(@screen.table_view).should == result.push(" ")
+ end
+
+end
+
describe "PM::Table module indexable/searchable" do
before do
@screen = TableScreenIndexableSearchable.new
end