Sha256: c890e63b588ddd6c151499070da57ec805501e3c08304c323069917ab30116aa
Contents?: true
Size: 1.29 KB
Versions: 4
Compression:
Stored size: 1.29 KB
Contents
require 'spec_helper' describe RemoteRun::Runner do let(:host_manager) { double(:host_manager) } let(:task_manager) { double(:task_manager, count: 0) } let(:configuration) { double(:configuration, quiet: true, before_task: nil, after_task: nil,around_task: nil, task_manager: task_manager, host_manager: host_manager) } let(:runner) { RemoteRun::Runner.new(configuration) } subject { runner } it { should be } describe "#start_task" do let(:task) { RemoteRun::Task.new } let(:host) { double(:host) } let(:pid) { double(:pid) } before do runner.stub(:fork).and_return(pid) task_manager.stub(:find_task).and_return(task) runner.start_task(host) end describe "the task" do subject { task } its(:pid) { should == pid } its(:host) { should == host } end end describe "#sync_working_copy_to_temp_location" do subject { runner.sync_working_copy_to_temp_location } before do configuration.stub(:local_path) configuration.stub(:temp_path) configuration.stub(:rsync_options) configuration.stub(:exclude).and_return([]) end it "issue a command to rsync the local working copy to a temporary location" do runner.should_receive(:system) subject end end end
Version data entries
4 entries across 4 versions & 1 rubygems