Sha256: 0f39109377278a999940984eeb626b411d9ee51e55b11c1e94a899e37b657a30
Contents?: true
Size: 788 Bytes
Versions: 4
Compression:
Stored size: 788 Bytes
Contents
require "test_helper" class CommandsBoxAddTest < Test::Unit::TestCase setup do @klass = Vagrant::Commands::Box::Add @persisted_vm = mock("persisted_vm") @persisted_vm.stubs(:execute!) @env = mock_environment @env.stubs(:require_persisted_vm) @env.stubs(:vm).returns(@persisted_vm) @instance = @klass.new(@env) end context "executing" do setup do @name = "foo" @path = "bar" end should "execute the add action with the name and path" do Vagrant::Box.expects(:add).with(@env, @name, @path).once @instance.execute([@name, @path]) end should "show help if not enough arguments" do Vagrant::Box.expects(:add).never @instance.expects(:show_help).once @instance.execute([]) end end end
Version data entries
4 entries across 4 versions & 2 rubygems