Sha256: 23b1b7daa9bdf413e4fca54e70b515831a2bc4fc1580dc052a6ba17efecb37a3

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

$:.unshift File.expand_path('../../lib', __FILE__)

require 'bacon'
require 'ovaltine'

describe 'Storyboard' do

  before do
    @path = File.expand_path('features/fixtures/Sample/Sample/Base.lproj/Main.storyboard')
    @storyboard = Ovaltine::Storyboard.new('Main', [@path])
  end

  it 'caches identifiers for generic view controllers' do
    @storyboard.view_controller_identifiers.should.include "sampleViewController"
  end

  it 'caches identifiers for collection view controllers' do
    @storyboard.view_controller_identifiers.should.include "collectionViewController"
  end

  it 'caches identifiers for table view controllers' do
    @storyboard.view_controller_identifiers.should.include "listViewController"
  end

  it 'caches identifiers for navigation view controllers' do
    @storyboard.view_controller_identifiers.should.include "navigationViewController"
  end

  it 'caches identifiers for named segues' do
    @storyboard.segue_identifiers.should.include "starterSegueIdentifier"
  end

  it 'caches cell reuse identifiers for table view cells' do
    @storyboard.cell_reuse_identifiers.should.include "sampleCellIdentifier"
  end

  it 'caches cell reuse identifiers for collection view cells' do
    @storyboard.cell_reuse_identifiers.should.include "squareCellIdentifier"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ovaltine-1.1.0 specs/storyboard_spec.rb
ovaltine-1.0.6 specs/storyboard_spec.rb
ovaltine-1.0.5 specs/storyboard_spec.rb