Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f14e1685de
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (15 sloc) 0.496 kB
require 'spec_helper'
describe JSONParser do
before do
@collection = LogCollection.new
@parser = JSONParser.new(@collection)
end
it "should parse messages" do
json_data = File.open("spec/fixtures/sample.json") {|f| f.read}
@parser.parse(StringIO.new(json_data))
@collection.entries.length.should == 11
@collection.senders.length.should == 2
@collection.senders['johnsmith'].should_not == nil
@collection.senders['myself'].should_not == nil
end
end
Jump to Line
Something went wrong with that request. Please try again.