Sha256: 494b7576e6c74a0e8f46f23e9d5ac126f2eb0df99c848e0baa23ac224209e87a
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require 'spec_helper' describe Ircp::Message do describe '#initialize' do context 'with args' do include_context 'initialize message', 'secretpasswordhere', :command => 'PASS' its(:command) { should eq 'PASS' } it_should_behave_like 'prefix for', nil it_should_behave_like 'params for', 'secretpasswordhere' end context 'with params' do include_context 'initialize message', :command => 'PASS', :params => ['secretpasswordhere'] its(:command) { should eq 'PASS' } it_should_behave_like 'prefix for', nil it_should_behave_like 'params for', 'secretpasswordhere' end context 'with args and params' do include_context 'initialize message', 'foo', :command => 'PRIVMSG', :params => ['hello'] its(:command) { should eq 'PRIVMSG' } it_should_behave_like 'prefix for', nil it_should_behave_like 'params for', 'foo', 'hello' end end describe '#to_s' do include_context 'initialize message', :command => 'TEST', :params => ['foo', 'bar', 'buzz'] its(:to_s) { should eq "TEST foo bar buzz\r\n" } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ircp-1.1.2 | spec/ircp/message_spec.rb |
ircp-1.1.1 | spec/ircp/message_spec.rb |
ircp-1.1.0 | spec/ircp/message_spec.rb |