Sha256: bef72f25769ac942abee1d87b7ad8d1a5b37ee4ba859c33ee4535cb8763f3717
Contents?: true
Size: 811 Bytes
Versions: 2
Compression:
Stored size: 811 Bytes
Contents
require File.dirname(__FILE__) + '/../helper' class FlipMiddlewareTest < Test::Unit::TestCase def test_shift_supports_hash_init receiver = flexmock m = Tracksperanto::Middleware::Flip.new(receiver) assert !m.enabled m = Tracksperanto::Middleware::Flip.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, 100, 95, 0) receiver.should_receive(:export_point).once.with(1, 10, 95, 0) m = Tracksperanto::Middleware::Flip.new(receiver, :enabled => true) m.start_export(110, 120) m.export_point(1, 10, 95, 0) m.enabled = false m.export_point(1, 10, 95, 0) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tracksperanto-2.0.1 | test/middleware/test_flip_middleware.rb |
tracksperanto-2.0.0 | test/middleware/test_flip_middleware.rb |