Sha256: 7d584fac73f3ed6b11f074f05fbe46e3ab4d6f05d33872671ad563d1fc4ff725

Contents?: true

Size: 707 Bytes

Versions: 21

Compression:

Stored size: 707 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class FlopMiddlewareTest < Test::Unit::TestCase
  def test_shift_supports_hash_init
    receiver = flexmock
    
    m = Tracksperanto::Middleware::Flop.new(receiver)
    assert !m.enabled
    
    m = Tracksperanto::Middleware::Flop.new(receiver, :enabled => true)
    assert m.enabled
  end
  
  def test_export_flip_and_flop
    receiver = flexmock(:exporter)
    receiver.should_receive(:start_export).once.with(110, 120)
    receiver.should_receive(:export_point).once.with(1, 10, 25, 0)
    
    m = Tracksperanto::Middleware::Flop.new(receiver, :enabled => true)
    m.start_export(110, 120)
    m.export_point(1, 10, 95, 0)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
tracksperanto-2.1.1 test/middleware/test_flop_middleware.rb