Sha256: 1f934f642f2e64056dbe194dba13965c602027d0b24be6f5b48581d98ecac00d

Contents?: true

Size: 895 Bytes

Versions: 85

Compression:

Stored size: 895 Bytes

Contents

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

RSpec.describe "iface:kern:net" do
  module_dep "net"
  include_context "iface:kern"

  #A callback was registered in the kernel for testing purposes
  it "A mock network callback should invoke the '-3209284741' telepointer callback and set int_net_cb_spec" do
    @secret = SecureRandom.hex

    #Wait for response
    @pipe.puts [0, "ping"].to_json; @pipe.readline_timeout

    @pipe.puts [3, "int_net_cb", -3209284741, true, {"secret" => @secret}].to_json
    @pipe.puts [0, "get_int_net_cb_spec"].to_json

    res = [
      [0, 1, "get_int_net_cb_spec", [-3209284741, true, {"secret"=>@secret}]]
    ]

    expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

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