forked from pieter/gitbot
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitman.rb
More file actions
31 lines (23 loc) · 778 Bytes
/
Copy pathgitman.rb
File metadata and controls
31 lines (23 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require File.join(File.dirname(__FILE__), 'testlib')
$plugins = []
$hooks = {}
require 'plugins/gitman'
class GitManPluginTest < Test::Unit::TestCase
def setup
@irc = MockIrc.new
@web = Gitman.new
end
def test_nil_irc_reply
@web.hook_privmsg_chan(@irc, "I like man git-rev-parse")
sleep(2)
assert_match(/Pieter: the git-rev-parse manpage can be found at http:\/\/.*/, @irc.message)
end
def test_implicit_with_reply
@web.hook_privmsg_chan(@irc, "John: see man git-log")
sleep(3)
assert_match(/John: the git-log manpage can be found at http.*$/, @irc.message)
@web.hook_privmsg_chan(@irc, "Jane, see man git-diff")
sleep(3)
assert_match(/Jane: the git-diff manpage can be found at http.*$/, @irc.message)
end
end