Sha256: dbbc03ce5987c49574ed2ca1cea72784cd159ba3443efce8ee8d2343f678f03b

Contents?: true

Size: 554 Bytes

Versions: 7

Compression:

Stored size: 554 Bytes

Contents

require 'spec_helper'

describe EDN::Reader do
  let(:reader) { EDN::Reader.new("[1 2] 3 :a {:b c} ") }

  it "should read each value" do
    reader.read.should == [1, 2]
    reader.read.should == 3
    reader.read.should == :a
    reader.read.should == {:b => ~"c"}
  end

  it "should respond to each" do
    reader.each do |element|
      element.should_not be_nil
    end
  end

  it "returns a special end of file value if asked" do
    4.times { reader.read(:the_end).should_not == :the_end }
    reader.read(:no_more).should == :no_more
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
edn2023-1.1.4 spec/edn/reader_spec.rb
edn-1.1.1 spec/edn/reader_spec.rb
edn-1.1.0 spec/edn/reader_spec.rb
edn-1.0.8 spec/edn/reader_spec.rb
edn-1.0.7 spec/edn/reader_spec.rb
edn-1.0.6 spec/edn/reader_spec.rb
edn-1.0.5 spec/edn/reader_spec.rb