Sha256: 61b98f7b1e77fdf04342271cb30bd45a9bfd33851a2fe9c4a32dfa5180ed0b9f

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

require 'spec_helper'

describe FluQ::Format::Lines do

  subject { FluQ::Format::Json.new }

  it { should be_a(described_class) }
  it { should be_a(FluQ::Format::Base) }

  it 'should parse' do
    subject.parse(%({"a":1})).should have(1).item
    subject.parse(%({"a":1}\n{"b":2}\n\n{"c":3}\n)).should have(3).items
  end

  it 'should deal with partials' do
    subject.parse(%({"a":1}\n{"b")).should == [{"a"=>1}]
    subject.parse(%(:2}\n)).should == [{"b"=>2}]
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluq-0.8.1 spec/fluq/format/lines_spec.rb
fluq-0.8.0 spec/fluq/format/lines_spec.rb