Sha256: 848e2e2ad5de37cd086ee4663c58481e225030081983fe7d0d5ba307d039f2cf

Contents?: true

Size: 945 Bytes

Versions: 6

Compression:

Stored size: 945 Bytes

Contents

require File.join( File.dirname(__FILE__) , '..', 'spec_helper' )
require File.join( File.dirname(__FILE__) , 'tuio_parameter_spec' )

# /tuio/2Dcur set s x y X Y m

describe TuioObjectParameter do
  describe "cursor creation" do
    before :each  do
      args = [  @session_id = 12,
                @x_pos = 0.1,
                @y_pos = 0.2]

      @tuio_param = TuioCursorParameter.new_from_initial_params( *args )
    end
    it "should have propper values set" do
      @tuio_param.session_id == @session_id
      @tuio_param.x_pos == @x_pos
      @tuio_param.y_pos == @y_pos
    end
  end
  
  describe "in general" do
    before :each  do
      args = [
        @session_id = 12,
        @x_pos = 0.1,
        @y_pos = 0.2,
        @x_speed = 0.01,
        @y_speed = 0.02,
        @motion_accel = 0.03,
      ]
    
      @tuio_param = TuioCursorParameter.new( *args )
    end
    
    it_should_behave_like "TuioParameter"
  end
  
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
aberant-tuio-ruby-0.2.0 spec/unit/tuio_cursor_parameter_spec.rb
aberant-tuio-ruby-0.2.1 spec/unit/tuio_cursor_parameter_spec.rb
tuio-ruby-0.2.5 spec/unit/tuio_cursor_parameter_spec.rb
tuio-ruby-0.2.4 spec/unit/tuio_cursor_parameter_spec.rb
tuio-ruby-0.2.3 spec/unit/tuio_cursor_parameter_spec.rb
tuio-ruby-0.2.2 spec/unit/tuio_cursor_parameter_spec.rb