Sha256: ca49ad698bc5ff39b237fb630eeefd24baaf458aac594680fb11a41f34f46b6e

Contents?: true

Size: 1.02 KB

Versions: 31

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require 'test_helper'

module Vedeu

  module Distributed

    describe Subprocess do

      let(:described)   { Vedeu::Distributed::Subprocess }
      let(:instance)    { described.new(application) }
      let(:application) {}

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
        it do
          instance.instance_variable_get('@application').must_equal(application)
        end
        it { instance.instance_variable_get('@pid').must_equal(nil) }
      end

      describe '.execute!' do
        it { described.must_respond_to(:execute!) }
      end

      describe '#execute!' do
        it { instance.must_respond_to(:execute!) }
      end

      describe '#kill' do
        before do
          Process.stubs(:kill)
          File.stubs(:unlink)
        end

        subject { instance.kill }

        it do
          Process.expects(:kill)
          File.expects(:unlink)
          subject
        end
      end

    end # Subprocess

  end # Distributed

end # Vedeu

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
vedeu-0.8.32 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.31 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.30 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.29 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.28 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.27 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.26 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.25 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.24 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.23 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.22 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.21 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.20 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.19 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.18 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.17 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.16 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.15 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.14 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.8.13 test/lib/vedeu/distributed/subprocess_test.rb