Sha256: d923d641c2a4efdc6134f7cbe79dd533cb13c720a99110a18bd6235754548410
Contents?: true
Size: 697 Bytes
Versions: 26
Compression:
Stored size: 697 Bytes
Contents
require 'ceml' class TestInstructions < Test::Unit::TestCase def pi text CEML.parse(:instructions, text) end def assert_bad text assert_raise(RuntimeError){ pi text } end def test_bad assert_bad "love your mother" assert_bad "tell jim re susan: i hate you" assert_bad "tell phil" assert_bad "ask susan re clothing" assert_bad "ask susan re clothing: " end def test_instructions assert_equal "run to the kitchen", pi('tell joe: run to the kitchen').i_tell([:joe]).text assert_equal ["favorite color?", "favorite soup?"], pi( "ask joe re color: favorite color?\nask joe re soup: favorite soup?" ).i_asks([:joe]).map(&:text) end end
Version data entries
26 entries across 26 versions & 1 rubygems