spec/semantics/symbol_table_spec.rb in tla-parser-s-0.1.2 vs spec/semantics/symbol_table_spec.rb in tla-parser-s-0.2.2
- old
+ new
@@ -110,11 +110,10 @@
:context => "vari",
:symbol_name => "vari",
},
},
-
].each_with_index do |testCase,i|
it "#Case #{i}: #{testCase[:desc]} - parse '#{testCase[:str]}' starting '#{testCase[:start]}'" do
@@ -127,16 +126,19 @@
end
tree.defines.each { |define| symbol_table.pushContext( define )}
end # iterate test case snippets
- expect( symbol_table.resolveContext( testCase[:resolve] ) ).to eql( testCase[:expect] );
-
+ result = symbol_table.resolveContext( testCase[:resolve] )
+ if testCase[:expect].nil?
+ expect( result ).to eql( nil )
+ else
+ expect( result ).to include( testCase[:expect] )
+ end
end # it
end # each
-
end
end