test/lib/vedeu/parsing/parser_test.rb in vedeu-0.0.39 vs test/lib/vedeu/parsing/parser_test.rb in vedeu-0.0.40

- old
+ new

@@ -1,19 +1,20 @@ -require_relative '../../../test_helper' -require_relative '../../../../lib/vedeu/parsing/parser' +require 'test_helper' +require '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...') + file = File.read('test/support/json/int1_lin1_str1.json') + parser = Parser.parse(file) - Parser.parse("{\"some\": \"JSON\"}") - .must_be_instance_of(Composition) + parser.must_be_instance_of(Array) + parser.size.must_equal(1) end it 'returns a collection of interfaces when the output is a Hash' do parser = Parser.parse({ parser_parse: 'Parser#parse' })