Sha256: 25e0fc4dcc27e1df64c3db929bdfd0f5668f255c8791c69c629f9dc60cbecc67
Contents?: true
Size: 504 Bytes
Versions: 15
Compression:
Stored size: 504 Bytes
Contents
# frozen_string_literal: true require 'test_helper' module Shipit class LineBufferTest < ActiveSupport::TestCase setup { @buffer = LineBuffer.new } test "buffers partial lines" do refute_predicate(@buffer.buffer("a"), :any?) assert_equal(["a"], @buffer.buffer("\n").to_a) assert_predicate(@buffer, :empty?) end test "splits up multiple lines" do assert_equal(%w(a b), @buffer.buffer("a\nb\n").to_a) assert_predicate(@buffer, :empty?) end end end
Version data entries
15 entries across 15 versions & 1 rubygems