Sha256: 653a0c5aff07cfb46ffc75bf316b32a4a95a7260fadd9190223a2b482c1e2b44

Contents?: true

Size: 744 Bytes

Versions: 67

Compression:

Stored size: 744 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
      expect { io.stdout = nil }.to 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

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

Version data entries

67 entries across 54 versions & 9 rubygems

Version Path
childprocess-5.1.0 spec/windows_spec.rb
childprocess-5.0.0 spec/windows_spec.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/spec/windows_spec.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/spec/windows_spec.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/spec/windows_spec.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/childprocess-4.1.0/spec/windows_spec.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/childprocess-4.1.0/spec/windows_spec.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/childprocess-4.1.0/spec/windows_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/childprocess-4.1.0/spec/windows_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/spec/windows_spec.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/childprocess-4.1.0/spec/windows_spec.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/childprocess-4.1.0/spec/windows_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/childprocess-4.1.0/spec/windows_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/spec/windows_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/childprocess-3.0.0/spec/windows_spec.rb
childprocess-4.1.0 spec/windows_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/spec/windows_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/childprocess-3.0.0/spec/windows_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/spec/windows_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/childprocess-3.0.0/spec/windows_spec.rb