Sha256: 4c76d4105060a4d5a6c1e334f336268b100aa68da5648bbb9b03ec3256bb65ca
Contents?: true
Size: 688 Bytes
Versions: 2
Compression:
Stored size: 688 Bytes
Contents
require 'test_helper' class TestBufferedStep < MiniTest::Test attr_reader :incoming, :outgoing, :step def setup rows = "row 1\nrow 2\nrow 3" @incoming = StringIO.new(rows) @outgoing = TestIO.new @step = Rodimus::BufferedStep.new step.incoming = incoming step.outgoing = outgoing end def test_buffering_rows step.buffer_size = 3 expected_write_count = 1 # writing 3 rows step.run assert_equal expected_write_count, outgoing.history.length end def test_flushing_rows step.buffer_size = 2 expected_write_count = 2 step.run assert_equal expected_write_count, outgoing.history.length end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rodimus-1.3.1 | test/rodimus/buffered_step_test.rb |
rodimus-1.3.0 | test/rodimus/buffered_step_test.rb |