Sha256: b46b95fb09979a8c16d8215b081b4329cca82e32e1cf9b0f0207bbb5809168c6

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 KB

Contents

class DevSystem::CommandPanelTest < Liza::PanelTest

  test :subject_class do
    assert_equality subject_class, DevSystem::CommandPanel
  end

  test :settings do
    assert_equality subject_class.log_level, :normal
    assert_equality subject_class.log_color, :green
  end

  test :parse do
    struct = subject.parse "generate"
    assert_equality struct.command, "generate"
    assert_equality struct.class_method, nil
    assert_equality struct.instance_method, nil
    assert_equality struct.method, nil

    struct = subject.parse "generate:install"
    assert_equality struct.command, "generate"
    assert_equality struct.class_method, "install"
    assert_equality struct.instance_method, nil
    assert_equality struct.method, nil

    struct = subject.parse "generate#install"
    assert_equality struct.command, "generate"
    assert_equality struct.class_method, nil
    assert_equality struct.instance_method, "install"
    assert_equality struct.method, nil

    struct = subject.parse "generate.install"
    assert_equality struct.command, "generate"
    assert_equality struct.class_method, nil
    assert_equality struct.instance_method, nil
    assert_equality struct.method, "install"
  end

  test :find do
    klass = subject.find "generate"
    assert_equality DevSystem::GenerateCommand, klass

    klass = subject.find "g"
    assert_equality DevSystem::NotFoundCommand, klass
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lizarb-1.0.4 lib/dev_system/dev/panels/command_panel_test.rb