Sha256: 5fd02bfc9276506d64448460c7f93b86f0fc981fe8c5659e80e4bbf5448e49b9

Contents?: true

Size: 977 Bytes

Versions: 64

Compression:

Stored size: 977 Bytes

Contents

Dir.chdir File.join File.dirname(__FILE__), '../../../'
require './spec/env/iface.rb'

RSpec.describe "iface:driver:pipe_spec" do
  include_context "iface:driver"

  it "does close the read back pipe when when a syntax error occurs" do
    @pipe.puts "a"

    expect(@pipe).to raise_eof_from_readline_within(6.seconds)
  end

  it "does not close the read back pipe when when no syntax error occurs" do
    @pipe.puts "[]"

    expect(@pipe).not_to raise_eof_from_readline_within(6.seconds)
  end

  it "does terminate the proccess when a syntax error occurs" do
    pid = @pipe.pid
    @pipe.puts "a"
    expect(pid).to die_within(6.seconds)
  end

  it "does terminate the proccess when the pipe is closed" do
    pid = @pipe.pid
    @pipe.close

    expect(pid).to die_within(6.seconds)
  end

  it "does have the ability to receive a RESTART command" do
    @pipe.puts "RESTART"
    expect(@pipe).to readline_and_equal_x_within_y_seconds("RESTART OK", 5.seconds)
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
flok-0.0.105 spec/iface/driver/pipe_spec.rb
flok-0.0.103 spec/iface/driver/pipe_spec.rb
flok-0.0.102 spec/iface/driver/pipe_spec.rb
flok-0.0.101 spec/iface/driver/pipe_spec.rb
flok-0.0.100 spec/iface/driver/pipe_spec.rb
flok-0.0.99 spec/iface/driver/pipe_spec.rb
flok-0.0.98 spec/iface/driver/pipe_spec.rb
flok-0.0.97 spec/iface/driver/pipe_spec.rb
flok-0.0.96 spec/iface/driver/pipe_spec.rb
flok-0.0.95 spec/iface/driver/pipe_spec.rb
flok-0.0.94 spec/iface/driver/pipe_spec.rb
flok-0.0.93 spec/iface/driver/pipe_spec.rb
flok-0.0.92 spec/iface/driver/pipe_spec.rb
flok-0.0.91 spec/iface/driver/pipe_spec.rb
flok-0.0.90 spec/iface/driver/pipe_spec.rb
flok-0.0.89 spec/iface/driver/pipe_spec.rb
flok-0.0.88 spec/iface/driver/pipe_spec.rb
flok-0.0.87 spec/iface/driver/pipe_spec.rb
flok-0.0.86 spec/iface/driver/pipe_spec.rb
flok-0.0.85 spec/iface/driver/pipe_spec.rb