Cross Reference: logicgraph_parser_spec.rb
xref
: /
ontohub
/
spec
/
lib
/
logicgraph_parser_spec.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
logicgraph_parser_spec.rb revision bb3af9fc8fc792fbf1cbd4a101555b47388033a2
require
'spec_helper'
describe
LogicgraphParser
do
def
open_fixture
(
name
)
File.open
(
fixture_file
(
name
)
)
end
context
"LogicgraphParser"
do
context
'parsing empty XML'
do
let
(:
symbols
)
{ [] }
before
do
OntologyParser.parse
open_fixture
(
'
empty.xml
'
)
,
symbol
:
Proc.new
{ |h|
symbols
<< h }
end
it
'not find any symbol'
do
expect
(
symbols.count
)
.
to
eq
(
0
)
end
end
context
'parsing invalid XML'
do
it
'not throw an exception'
do
expect
(
OntologyParser.parse
open_fixture
(
'
broken.xml
'
)
, {})
.
not_to
raise_error
end
end
end
end