Sha256: c63e7a51f810782ce58ed07086ba8f9e18f16257d53108449ccacb8a8f6a51c9

Contents?: true

Size: 764 Bytes

Versions: 12

Compression:

Stored size: 764 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

describe "Command" do
  describe ".find" do
    before_all {
      reset_boson
      Boson.libraries << Library.new(:name=>'bling', :namespace=>true)
      @namespace_command = Command.new(:name=>'blah', :lib=>'bling', :namespace=>'bling')
      @top_level_command = Command.new(:name=>'blah', :lib=>'bling')
      Boson.commands << @namespace_command
      Boson.commands << @top_level_command
    }

    it 'finds correct command when a subcommand of the same name exists' do
      Command.find('blah').should == @top_level_command
    end

    it 'finds correct command when a top level command of the same name exists' do
      Command.find('bling.blah').should == @namespace_command
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
boson-more-0.2.1 test/command_test.rb
boson-more-0.2.0 test/command_test.rb
boson-more-0.1.0 test/command_test.rb
boson-0.4.0 test/command_test.rb
bosonson-0.304.3 test/command_test.rb
bosonson-0.304.2 test/command_test.rb
bosonson-0.304.1 test/command_test.rb
boson-0.3.4 test/command_test.rb
boson-0.3.3 test/command_test.rb
boson-0.3.2 test/command_test.rb
boson-0.3.1 test/command_test.rb
boson-0.3.0 test/command_test.rb