Sha256: 9c35a711ef970c82e8954a8e978366868d0a37da0e1da85452fd7fb35a64dc39

Contents?: true

Size: 946 Bytes

Versions: 1

Compression:

Stored size: 946 Bytes

Contents

require 'spec_helper'

describe VagrantPlugins::ShellCommander::Plugin do
  it 'should have a name' do
    expect(described_class.name).not_to be_nil
  end

  it "should define a command of type Command" do
    default_command = described_class.components.commands[:sh]
    expect(default_command[1]).to eql(primary: true)
  end

  it "should define a config of type Config" do
    default_config = described_class.components.configs[:top].to_hash[:"sh"]
    expect(default_config).to be(VagrantPlugins::ShellCommander::Config)
  end

  context 'action hooks' do
    let(:hook) {double(append: true, prepend: true)}

    it 'should define an action hook for after share folders' do
      hook_proc = described_class.components.action_hooks[:__all_actions__][0]
      hook = double
      expect(hook).to receive(:after).with(Vagrant::Action::Builtin::Provision, VagrantPlugins::ShellCommander::Action)
      hook_proc.call(hook)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-shell-commander-0.3.2 spec/plugin_spec.rb