Sha256: ce10a28817b22088aece0b62742ae38fa31bacd220307f009f9a788dd3b6a663

Contents?: true

Size: 898 Bytes

Versions: 12

Compression:

Stored size: 898 Bytes

Contents

require 'test_helper'

module Vedeu

  describe Subprocess do

    let(:described)   { Vedeu::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 {
        Process.expects(:kill)
        File.expects(:unlink)
        subject
      }
    end

  end # Subprocess

end # Vedeu

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vedeu-0.6.8 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.7 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.6 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.5 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.4 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.3 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.2 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.1 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.6.0 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.5.13 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.5.12 test/lib/vedeu/distributed/subprocess_test.rb
vedeu-0.5.11 test/lib/vedeu/distributed/subprocess_test.rb