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.84 spec/iface/kern/net_spec.rb
flok-0.0.83 spec/iface/kern/net_spec.rb
flok-0.0.82 spec/iface/kern/net_spec.rb
flok-0.0.81 spec/iface/kern/net_spec.rb
flok-0.0.80 spec/iface/kern/net_spec.rb
flok-0.0.79 spec/iface/kern/net_spec.rb
flok-0.0.78 spec/iface/kern/net_spec.rb
flok-0.0.77 spec/iface/kern/net_spec.rb
flok-0.0.76 spec/iface/kern/net_spec.rb
flok-0.0.75 spec/iface/kern/net_spec.rb
flok-0.0.74 spec/iface/kern/net_spec.rb
flok-0.0.73 spec/iface/kern/net_spec.rb
flok-0.0.72 spec/iface/kern/net_spec.rb
flok-0.0.71 spec/iface/kern/net_spec.rb
flok-0.0.70 spec/iface/kern/net_spec.rb
flok-0.0.69 spec/iface/kern/net_spec.rb
flok-0.0.68 spec/iface/kern/net_spec.rb
flok-0.0.67 spec/iface/kern/net_spec.rb
flok-0.0.66 spec/iface/kern/net_spec.rb
flok-0.0.65 spec/iface/kern/net_spec.rb