Sha256: cbce3103162638a6f87dd272c2815b87ef1e37dee6b772f9388a596a29cc7cd3

Contents?: true

Size: 589 Bytes

Versions: 11

Compression:

Stored size: 589 Bytes

Contents

require 'spec_helper'
require 'anvil/task/naming'

describe Anvil::Task::Naming do
  let(:klass) { DummyTask }

  describe '#task_name' do
    it 'returns the correct task name' do
      expect(klass.task_name).to be_eql('dummy')
    end
  end

  describe '.from_name' do
    context 'without a namespace' do
      it 'finds the task class' do
        klass.from_name('dummy').should eq(DummyTask)
      end
    end

    context 'with a namespace' do
      it 'finds the namespaced tasks class' do
        klass.from_name('foo:dummy').should eq(Foo::DummyTask)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
anvil-core-0.4.2 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.4.1 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.4.0 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.3.2 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.3.1 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.3.0 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.2.0 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.1.0 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.0.1.pre.alpha.3 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.0.1.pre.alpha.2 spec/lib/anvil/task/naming_spec.rb
anvil-core-0.0.1.alpha.1 spec/lib/task/naming_spec.rb