Sha256: b6433c5538208e16737a8c0c38710b87dc46c7cf04b89f37ee868ad1d2af9709
Contents?: true
Size: 1.16 KB
Versions: 1
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper' describe VagrantShellCommander::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.command. to_hash[:"sh"] expect(default_command).to be(VagrantShellCommander::Command) 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(VagrantShellCommander::Config) end context 'action hooks' do let(:hook) {double(append: true, prepend: true)} it "should define an action hook for machine_action_up" do hook_proc = described_class.components.action_hooks[:machine_action_up][0] hook = double expect(hook).to receive(:append).with(VagrantShellCommander::Action) hook_proc.call(hook) end it "should define an action hook for machine_action_reload" do hook_proc = described_class.components.action_hooks[:machine_action_reload][0] hook = double expect(hook).to receive(:append).with(VagrantShellCommander::Action) hook_proc.call(hook) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-shell-commander-0.2.0 | spec/plugin_spec.rb |