Sha256: 398df50d91897a0a612c5aab10c63b75287781a7e4636fd378e06c1748faf604
Contents?: true
Size: 901 Bytes
Versions: 32
Compression:
Stored size: 901 Bytes
Contents
require_relative "../../../../base" describe "VagrantPlugins::GuestTinyCore::Cap::ChangeHostName" do let(:described_class) do VagrantPlugins::GuestTinyCore::Plugin.components.guest_capabilities[:tinycore].get(:change_host_name) end let(:machine) { double("machine") } let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) } let(:old_hostname) { 'boot2docker' } before do allow(machine).to receive(:communicate).and_return(communicator) communicator.stub_command('hostname -f', stdout: old_hostname) end after do communicator.verify_expectations! end describe ".change_host_name" do it "refreshes the hostname service with the sethostname command" do communicator.expect_command(%q(/usr/bin/sethostname newhostname.newdomain.tld)) described_class.change_host_name(machine, 'newhostname.newdomain.tld') end end end
Version data entries
32 entries across 28 versions & 6 rubygems