Sha256: f3c5c9f4536f3c78f01dc4493fda75c15a43d102b1a66947d2ba90b139b9e4d5

Contents?: true

Size: 739 Bytes

Versions: 1

Compression:

Stored size: 739 Bytes

Contents

describe CLIForge::Configuration, "#register_command" do

  it "should register the command" do
    command = double("TestCommand")
    subject.register_command(:foo, command)

    expect(subject.embedded_commands[:foo]).to be(command)
  end

  it "should coerce string names to symbols" do
    command = double("TestCommand")
    subject.register_command("foo", command)

    expect(subject.embedded_commands[:foo]).to be(command)
  end

  it "should allow you to register over existing commands" do
    command1 = double("TestCommand1")
    command2 = double("TestCommand2")
    subject.register_command(:foo, command1)
    subject.register_command(:foo, command2)

    expect(subject.embedded_commands[:foo]).to be(command2)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cli-forge-0.1.0 spec/unit/cli_forge/configuration/register_command_spec.rb