lib/atp/validator.rb in atp-0.2.1 vs lib/atp/validator.rb in atp-0.3.0

- old
+ new

@@ -12,11 +12,21 @@ super else @top_level_called = true setup super(node) - exit 1 if on_completion + unless @testing + exit 1 if on_completion + end end + end + + # For test purposes, returns true if validation failed rather + # than exiting the process + def test_process(node) + @testing = true + process(node) + on_completion end def setup end end