Sha256: fb86565a68087b18bbb47c7494543e5ac813e644d58f4a2e43b8aeea533684a0

Contents?: true

Size: 1.71 KB

Versions: 15

Compression:

Stored size: 1.71 KB

Contents

describe TestCreateViaExtensionsMenu do

  before do
    @subject = TestCreateViaExtensionsMenu.new
  end

  it 'should have four items' do
    @subject.menu.itemArray.length.should == 4
  end

  it 'should have an application menu item' do
    app_item = @subject.menu.itemArray[0]
    app_item.should.not == nil
    app_item.should.be.kind_of(NSMenuItem)
    app_item.title.should == 'MotionKit'
  end

  it 'should have an application menu item with submenu' do
    app_item = @subject.menu.itemArray[0]
    app_menu = app_item.submenu
    app_menu.itemArray.length.should > 0
  end

  it 'should have a file menu item' do
    file_item = @subject.menu.itemArray[1]
    file_item.should.not == nil
    file_item.should.be.kind_of(NSMenuItem)
    file_item.title.should == 'File'
  end

  it 'should have a file menu item with submenu' do
    file_item = @subject.menu.itemArray[1]
    file_menu = file_item.submenu
    file_menu.itemArray.length.should > 0
  end

  it 'should have a window menu item' do
    window_item = @subject.menu.itemArray[2]
    window_item.should.not == nil
    window_item.should.be.kind_of(NSMenuItem)
    window_item.title.should == 'Window'
  end

  it 'should have a window menu item with submenu' do
    window_item = @subject.menu.itemArray[2]
    window_menu = window_item.submenu
    window_menu.itemArray.length.should > 0
  end

  it 'should have a help menu item' do
    help_item = @subject.menu.itemArray[3]
    help_item.should.not == nil
    help_item.should.be.kind_of(NSMenuItem)
    help_item.title.should == 'Help'
  end

  it 'should have a help menu item with submenu' do
    help_item = @subject.menu.itemArray[3]
    help_menu = help_item.submenu
    help_menu.itemArray.length.should > 0
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
motion-kit-0.10.8 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.7 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.6 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.5 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.4 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.3 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.2 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.1 spec/osx/create_via_extensions_spec.rb
motion-kit-0.10.0 spec/osx/create_via_extensions_spec.rb
motion-kit-0.9.6 spec/osx/create_via_extensions_spec.rb
motion-kit-0.9.4 spec/osx/create_via_extensions_spec.rb
motion-kit-0.9.3 spec/osx/create_via_extensions_spec.rb
motion-kit-0.9.2 spec/osx/create_via_extensions_spec.rb
motion-kit-0.9.1 spec/osx/create_via_extensions_spec.rb
motion-kit-0.9.0 spec/osx/create_via_extensions_spec.rb