Sha256: aea9eb71ef067d3a3bfffe2e1eb8337131b6faf587e5ac0ba64cd5b7ffc6d492
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require_relative '../../../spec_helper' require 'fileutils' require Arachni::Options.instance.dir['lib'] + 'rpc/client/dispatcher' require Arachni::Options.instance.dir['lib'] + 'rpc/server/dispatcher' describe Arachni::RPC::Client::Dispatcher do before( :all ) do @opts = Arachni::Options.instance @opts.rpc_port = random_port @opts.pool_size = 0 @handler_lib = Arachni::Options.dir['rpcd_handlers'] FileUtils.cp( "#{fixtures_path}rpcd_handlers/echo.rb", @handler_lib ) fork_em { Arachni::RPC::Server::Dispatcher.new( @opts ) } sleep 1 @dispatcher = Arachni::RPC::Client::Dispatcher.new( @opts, "#{@opts.rpc_address}:#{@opts.rpc_port}" ) end after( :all ) do FileUtils.rm( "#{@handler_lib}echo.rb" ) end it 'maps the remote handlers to local objects' do args = [ 'stuff', 'here', { blah: true } ] @dispatcher.echo.echo( *args ).should == args end describe '#node' do it 'provides access to the node data' do @dispatcher.node.info.is_a?( Hash ).should be_true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arachni-0.4.2 | spec/arachni/rpc/client/dispatcher_spec.rb |