Sha256: c7fe3d29ac74e17efd628f7d2efe8a0be805e6f7a68a4c2bd1e40c10d65f7e85

Contents?: true

Size: 891 Bytes

Versions: 10

Compression:

Stored size: 891 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class GoldenMiddlewareTest < Test::Unit::TestCase
  
  def test_action_description
    assert_equal "Reset residual of all the trackers to zero", Tracksperanto::Middleware::Golden.action_description
  end
  
  def test_golden_bypasses_methods
    receiver = flexmock
    
    receiver.should_receive(:start_export).once.with(120,120)
    receiver.should_receive(:start_tracker_segment).once.with("Tracker")
    receiver.should_receive(:export_point).once.with(0, 100, 100, 0.0)
    receiver.should_receive(:end_tracker_segment).once
    receiver.should_receive(:end_export).once
    
    m = Tracksperanto::Middleware::Golden.new(receiver)
    m.start_export(120, 120)
    m.start_tracker_segment("Tracker")
    m.export_point(0, 100, 100, 0.56)
    m.end_tracker_segment
    m.end_export
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tracksperanto-2.12.0 test/middleware/test_golden_middleware.rb
tracksperanto-2.11.3 test/middleware/test_golden_middleware.rb
tracksperanto-2.11.2 test/middleware/test_golden_middleware.rb
tracksperanto-2.11.1 test/middleware/test_golden_middleware.rb
tracksperanto-2.11.0 test/middleware/test_golden_middleware.rb
tracksperanto-2.10.0 test/middleware/test_golden_middleware.rb
tracksperanto-2.9.9 test/middleware/test_golden_middleware.rb
tracksperanto-2.9.8 test/middleware/test_golden_middleware.rb
tracksperanto-2.9.7 test/middleware/test_golden_middleware.rb
tracksperanto-2.9.6 test/middleware/test_golden_middleware.rb