Sha256: 940754b0ccb80ac2087159162beac2d19d2ee2e9f56f1edc58050247b99fe9c0

Contents?: true

Size: 604 Bytes

Versions: 2

Compression:

Stored size: 604 Bytes

Contents

require 'rubygems'
require 'spec'
require 'rr'
require 'osc'
require 'lib/tuio_client'

Spec::Runner.configure do |config|
    config.mock_with RR::Adapters::Rspec
end

# monkey patch to get at osc core to send messages
class TUIOClient
  def osc
    @osc
  end
end

# helper method for integration tests
def send_message( pattern, *msg )
  osc_msg = OSC::Message.new( pattern, nil, *msg)
  
  @server.osc.send( :sendmesg, osc_msg )
end

def setup_server
  mock( socket = Object.new )

  # stub out networking
  stub(socket).bind("", 3333)
  stub(UDPSocket).new { socket }

  @server = TUIOClient.new
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aberant-tuio-ruby-0.0.1 spec/spec_helper.rb
aberant-tuio-ruby-0.0.2 spec/spec_helper.rb