Sha256: 0f96c7fe54beda894b2d0e6e45a2844e0596b001eba39225fdda386bf4c81b86
Contents?: true
Size: 898 Bytes
Versions: 2
Compression:
Stored size: 898 Bytes
Contents
require "spec_helper" module MelissaData describe CLI do before :each do @klass = MelissaData::CLI end context "registering" do it "registers a base command as a single invokable" do base = Class.new(MelissaData::Command::Base) name = "__test_registering_single_subcommand" @klass.register(base, name, name, "A description") @klass.tasks[name].should_not be_blank # assert @klass.tasks[name] end it "aliases methods if the alias option is given" do base = Class.new(MelissaData::Command::Base) do def execute raise "WORKED" end end name = "__test_registering_with_alias" @klass.register(base, name, name, "A description", :alias => "--ALIAS") lambda { @klass.start(["--ALIAS"]) }.should raise_error(RuntimeError) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
melissadata-0.1.0 | spec/melissadata/cli_spec.rb |
melissadata-0.0.1 | spec/melissadata/cli_spec.rb |