Sha256: e61fc50a57d19fb11db1da167dc51d4f80beadd799cc4fe19c794c5952a09d41

Contents?: true

Size: 1017 Bytes

Versions: 6

Compression:

Stored size: 1017 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.8.0 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.7.4 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.7.3 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.7.2 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.7.1 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.7.0 test/lib/vedeu/distributed/subprocess_test.rb