C0 code coverage information
Generated on Sun Jul 06 22:30:58 +0900 2008 with rcov 0.8.1.2
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 #!/usr/bin/env ruby
2 require File.dirname(__FILE__) + '/spec_helper.rb'
3 require "pathname"
4
5 include Citrus
6
7
8 describe Plugin do
9 before do
10 @core = DummyCore.new({})
11 @socket = @core.socket
12 end
13
14 it "has utility post methods" do
15 @plugin = Plugin.new(@core, {})
16 @socket.clear
17
18 @plugin.privmsg("#test", "message")
19 @plugin.privmsg("#test", "message with space")
20
21 @socket.pop.to_s.should == "PRIVMSG #test message\r\n"
22 @socket.pop.to_s.should == "PRIVMSG #test :message with space\r\n"
23 end
24
25 it "has utility log method" do
26 @plugin = Plugin.new(@core, {})
27 @plugin.log("aaa")
28 end
29
30 it "has utility datafile method" do
31 @plugin = Plugin.new(@core, {})
32 @plugin.datafile("foobar.db").to_s.should == "#{@core.config.general["data_dir"]}/Plugin/foobar.db"
33 @plugin.datafile("foobar.db").should be_a_kind_of(Pathname)
34 @plugin.datafile("foobar.db").parent.exist?.should be_true
35 end
36 end
37
Generated using the rcov code coverage analysis tool for Ruby
version 0.8.1.2.