spec/unit/tables/table_indexable_spec.rb in ProMotion-1.0.3 vs spec/unit/tables/table_indexable_spec.rb in ProMotion-1.0.4
- old
+ new
@@ -1,12 +1,25 @@
-describe "PM::Table module" do
-
+describe "PM::Table module indexable" do
+
before do
@screen = TableScreenIndexable.new
end
-
+
it "should automatically return the first letter of each section" do
result = %w{ A G M O S U }
+ @screen.sectionIndexTitlesForTableView(@screen.table_view).should == result
+ end
+
+end
+
+describe "PM::Table module indexable/searchable" do
+
+ before do
+ @screen = TableScreenIndexableSearchable.new
+ end
+
+ it "should automatically return the first letter of each section" do
+ result = %w{ {search} A G M O S U }
@screen.sectionIndexTitlesForTableView(@screen.table_view).should == result
end
end