Sha256: ab4687394ff8c6c74f13c749d8e07a88170618cb8cf005210a4526153f22a56a

Contents?: true

Size: 752 Bytes

Versions: 61

Compression:

Stored size: 752 Bytes

Contents

require File.expand_path('../spec_helper', __FILE__)
require "pid_behavior"

if ChildProcess.windows?
  describe ChildProcess::Windows::Process do
    it_behaves_like "a platform that provides the child's pid"
  end

  describe ChildProcess::Windows::IO do
    let(:io) { ChildProcess::Windows::IO.new }

    it "raises an ArgumentError if given IO does not respond to :fileno" do
      lambda { io.stdout = nil }.should raise_error(ArgumentError, /must have :fileno or :to_io/)
    end

    it "raises an ArgumentError if the #to_io does not return an IO " do
      fake_io = Object.new
      def fake_io.to_io() StringIO.new end

      lambda { io.stdout = fake_io }.should raise_error(ArgumentError, /must have :fileno or :to_io/)
    end
  end
end

Version data entries

61 entries across 61 versions & 12 rubygems

Version Path
childprocess-0.3.9 spec/windows_spec.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/childprocess-0.3.8/spec/windows_spec.rb
childprocess-0.3.8 spec/windows_spec.rb
childprocess-0.3.7 spec/windows_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.6/spec/windows_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.6/spec/windows_spec.rb
childprocess-0.3.6 spec/windows_spec.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/childprocess-0.3.5/spec/windows_spec.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/childprocess-0.3.5/spec/windows_spec.rb
childprocess-0.3.5 spec/windows_spec.rb
childprocess-0.3.4 spec/windows_spec.rb
childprocess-0.3.3 spec/windows_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/spec/windows_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/spec/windows_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/spec/windows_spec.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/spec/windows_spec.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/childprocess-0.3.2/spec/windows_spec.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/childprocess-0.3.1/spec/windows_spec.rb
ftl-0.2.0 vendor/bundle/gems/childprocess-0.3.2/spec/windows_spec.rb
childprocess-0.3.2 spec/windows_spec.rb