Changeset 5759 for lang/ruby/net-irc
- Timestamp:
- 01/29/08 06:21:42 (5 years ago)
- Location:
- lang/ruby/net-irc/trunk
- Files:
-
- 1 removed
- 2 modified
-
Rakefile (modified) (4 diffs)
-
spec/net-irc_spec.rb (modified) (4 diffs)
-
test (deleted)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/net-irc/trunk/Rakefile
r5675 r5759 3 3 require 'rake' 4 4 require 'rake/clean' 5 require 'rake/testtask'6 5 require 'rake/packagetask' 7 6 require 'rake/gempackagetask' … … 38 37 ] 39 38 40 task :default => [: test]39 task :default => [:spec] 41 40 task :package => [:clean] 42 41 43 Rake::TestTask.new("test") do |t| 44 t.libs << "test" 45 t.pattern = "test/**/*_test.rb" 46 t.verbose = true 42 Spec::Rake::SpecTask.new do |t| 43 t.spec_opts = ['--options', "spec/spec.opts"] 44 t.spec_files = FileList['spec/*_spec.rb'] 47 45 end 48 46 … … 64 62 s.require_path = "lib" 65 63 s.autorequire = "" 66 s.test_files = Dir["test/test_*.rb"]67 64 68 65 #s.add_dependency('activesupport', '>=1.3.1') … … 134 131 s.Task :rubyforge 135 132 end 136 137 desc "Run the specs under spec/models"138 Spec::Rake::SpecTask.new do |t|139 t.spec_opts = ['--options', "spec/spec.opts"]140 t.spec_files = FileList['spec/*_spec.rb']141 end -
lang/ruby/net-irc/trunk/spec/net-irc_spec.rb
r5758 r5759 12 12 require "spec" 13 13 14 describe Message, "construct" do14 describe Net::IRC::Message, "construct" do 15 15 16 16 it "should generate message correctly" do … … 45 45 end 46 46 47 describe Message, "parse" do47 describe Net::IRC::Message, "parse" do 48 48 it "should parse correctly following RFC." do 49 49 m = Message.parse("PRIVMSG #channel message\r\n") … … 257 257 true until client_q.pop.to_s == "NOTICE #test sep1\r\n" 258 258 c = @client.instance_variable_get(:@channels) 259 c.should be_a_kind_of(Hash)260 c["#test"].should be_a_kind_of(Hash)261 c["#test"][:modes].should be_a_kind_of(Array)262 c["#test"][:users].should be_a_kind_of(Array)263 c["#test"][:users].should == ["foonick"]259 c.should be_a_kind_of(Hash) 260 c["#test"].should be_a_kind_of(Hash) 261 c["#test"][:modes].should be_a_kind_of(Array) 262 c["#test"][:users].should be_a_kind_of(Array) 263 c["#test"][:users].should == ["foonick"] 264 264 265 265 true until client_q.pop.to_s == "NOTICE #test sep2\r\n" 266 c["#test"][:users].should == ["foonick", "test1", "test2"]266 c["#test"][:users].should == ["foonick", "test1", "test2"] 267 267 268 268 true until client_q.pop.to_s == "NOTICE #test sep3\r\n" 269 c["#test"][:users].should == ["foonick", "test1", "test2", "foo1", "foo2", "foo3", "foo4", "foo5"]270 c["#test"][:modes].should include(["s", nil])271 c["#test"][:modes].should include(["o", "foo4"])272 c["#test"][:modes].should include(["v", "foo5"])269 c["#test"][:users].should == ["foonick", "test1", "test2", "foo1", "foo2", "foo3", "foo4", "foo5"] 270 c["#test"][:modes].should include(["s", nil]) 271 c["#test"][:modes].should include(["o", "foo4"]) 272 c["#test"][:modes].should include(["v", "foo5"]) 273 273 274 274 true until client_q.pop.to_s == "NOTICE #test sep4\r\n" … … 286 286 end 287 287 end 288
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)