Sha256: 7225f10d51f9339a505dcc6524b8b900972c7b351a8c669ec9fd2ddf87d187e4

Contents?: true

Size: 931 Bytes

Versions: 23

Compression:

Stored size: 931 Bytes

Contents

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 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

  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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ProMotion-3.0.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.8.2 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.8.1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.8.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.7.1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.7.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.6.1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.6.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.5.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.5.0.beta1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.4.2 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.4.1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.4.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.3.1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.3.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.2.2 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.2.1 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.2.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.1.0 spec/unit/tables/table_indexable_spec.rb
ProMotion-2.1.0.beta1 spec/unit/tables/table_indexable_spec.rb