Sha256: a4d696130054b06089f8f6797186cbdc5a8c8f987c394b27e3751434df06bf37
Contents?: true
Size: 1021 Bytes
Versions: 3
Compression:
Stored size: 1021 Bytes
Contents
require 'spec_helper' describe Ircp::Prefix do describe '#initialize' do context 'with servername' do before { @prefix = Ircp::Prefix.new(:servername => 'example.com') } subject { @prefix } its(:servername) { should eq 'example.com' } end context 'with nick, user and host' do before { @prefix = Ircp::Prefix.new(:nick => 'foo', :user => 'bar', :host => 'example.com') } subject { @prefix } its(:nick) { should eq 'foo' } its(:user) { should eq 'bar' } its(:host) { should eq 'example.com' } end end describe '#to_s' do context 'with servername' do before { @prefix = Ircp::Prefix.new(:servername => 'example.com') } subject { @prefix } its(:to_s) { should eq ':example.com' } end context 'with nick, user and host' do before { @prefix = Ircp::Prefix.new(:nick => 'foo', :user => 'bar', :host => 'example.com') } subject { @prefix } its(:to_s) { should eq ':foo!bar@example.com' } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ircp-1.1.2 | spec/ircp/prefix_spec.rb |
ircp-1.1.1 | spec/ircp/prefix_spec.rb |
ircp-1.1.0 | spec/ircp/prefix_spec.rb |