test/test_cognition.rb in cognition-2.0.7 vs test/test_cognition.rb in cognition-2.0.8

- old
+ new

@@ -1,8 +1,9 @@ require "minitest/autorun" require "cognition" require_relative "fixtures/hello" +require_relative "fixtures/anchor" class CognitionTest < Minitest::Test def setup @bot = Cognition::Bot.new end @@ -36,7 +37,13 @@ def test_shows_help_if_no_matches @bot.register(Hello) msg = Cognition::Message.new("pong") output = @bot.process(msg) assert_match "No such command: pong\nUse 'help' for available commands!", output + end + + def test_anchored_ping + @bot.register(Anchor) + + assert_equal 'OK', @bot.process("ping me") end end