Sha256: 2148bda5cb9983b422fa4096fd4d558b8a650035ef005c78dba51e162505d082
Contents?: true
Size: 876 Bytes
Versions: 3
Compression:
Stored size: 876 Bytes
Contents
require_relative '../../../test_helper' require_relative '../../../../lib/vedeu/parsing/parser' module Vedeu describe Parser do describe '#parse' do it 'returns a NilClass when the output is empty' do Parser.parse.must_be_instance_of(NilClass) end it 'returns a Composition when the output is JSON' do skip('This is not working as it should...') Parser.parse("{\"some\": \"JSON\"}") .must_be_instance_of(Composition) end it 'returns a collection of interfaces when the output is a Hash' do parser = Parser.parse({ parser_parse: 'Parser#parse' }) parser.must_be_instance_of(Array) parser.size.must_equal(1) end it 'raises an exception when the output is anything else' do proc { Parser.parse([:invalid]) }.must_raise(ParseError) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.0.39 | test/lib/vedeu/parsing/parser_test.rb |
vedeu-0.0.38 | test/lib/vedeu/parsing/parser_test.rb |
vedeu-0.0.37 | test/lib/vedeu/parsing/parser_test.rb |