Changeset 6594 for lang/ruby/chokan/branches/citrus/plugins/system.rb
- Timestamp:
- 02/12/08 15:14:41 (10 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/chokan/branches/citrus/plugins/system.rb
r6586 r6594 106 106 107 107 it "should response to operator" do 108 @socket. string = ""108 @socket.clear 109 109 @plugin.on_privmsg(@prefix, "#test", "operator?") 110 @socket.s tring.should == ""110 @socket.should be_empty 111 111 112 @socket. string = ""112 @socket.clear 113 113 @plugin.on_privmsg(@prefixop, "#test", "operator?") 114 @socket. string.should == "NOTICE #test :You are an operator for me.\r\n"114 @socket.pop.to_s.should == "NOTICE #test :You are an operator for me.\r\n" 115 115 116 116 @plugin = System.new(@core, { "System" => { … … 118 118 } }) 119 119 120 @socket. string = ""120 @socket.clear 121 121 @plugin.on_privmsg(@prefixop, "#test", "operator?") 122 @socket. string.should == "NOTICE #test :You are an operator for me.\r\n"122 @socket.pop.to_s.should == "NOTICE #test :You are an operator for me.\r\n" 123 123 124 124 @plugin = System.new(@core, { "System" => { … … 126 126 } }) 127 127 128 @socket. string = ""128 @socket.clear 129 129 @plugin.on_privmsg(@prefixop, "#test", "operator?") 130 @socket. string.should == "NOTICE #test :You are an operator for me.\r\n"130 @socket.pop.to_s.should == "NOTICE #test :You are an operator for me.\r\n" 131 131 end 132 132 133 133 it "can reload_plugins" do 134 @socket. string = ""134 @socket.clear 135 135 @plugin.on_privmsg(@prefixop, "#test", "reload") 136 @socket. string.should match(/^NOTICE #test /)136 @socket.pop.to_s.should match(/^NOTICE #test /) 137 137 138 @socket. string = ""138 @socket.clear 139 139 @plugin.on_privmsg(@prefixop, "#test", "reload Foo") 140 @socket. string.should match(/^NOTICE #test /)140 @socket.pop.to_s.should match(/^NOTICE #test /) 141 141 142 @socket. string = ""142 @socket.clear 143 143 @plugin.on_privmsg(@prefixop, "#test", "reload Unknown") 144 @socket. string.should match(/^NOTICE #test /)144 @socket.pop.to_s.should match(/^NOTICE #test /) 145 145 146 146 def @core.reload_config … … 148 148 end 149 149 150 @socket. string = ""150 @socket.clear 151 151 @plugin.on_privmsg(@prefixop, "#test", "reload") 152 @socket. string.should match(/^NOTICE #test /)152 @socket.pop.to_s.should match(/^NOTICE #test /) 153 153 end 154 154 155 155 it "can operate join/part" do 156 @socket. string = ""156 @socket.clear 157 157 @plugin.on_privmsg(@prefixop, "#test", "chokan: part") 158 @socket. string.should match(/^PART #test /)158 @socket.pop.to_s.should match(/^PART #test /) 159 159 160 @socket. string = ""160 @socket.clear 161 161 @plugin.on_privmsg(@prefixop, "#test", "chokan: join to #foobar") 162 @socket. string.should match(/^JOIN #foobar /)162 @socket.pop.to_s.should match(/^JOIN #foobar /) 163 163 164 @socket. string = ""164 @socket.clear 165 165 @plugin.on_privmsg(@prefixop, "#test", "chokan: join to #foobar password") 166 @socket. string.should match(/^JOIN #foobar password/)166 @socket.pop.to_s.should match(/^JOIN #foobar password/) 167 167 end 168 168 169 169 it "can Gem.clear_paths" do 170 @socket. string = ""170 @socket.clear 171 171 @plugin.on_privmsg(@prefixop, "#test", "Gem.clear_paths") 172 @socket. string.should match(/^NOTICE #test :Gem.clear_paths/)172 @socket.pop.to_s.should match(/^NOTICE #test :Gem.clear_paths/) 173 173 end 174 174 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)