Sha256: cfda43b9b98c391dddabc7731ad91bd813aafac42d7445ef6f4be7a0358df2f4

Contents?: true

Size: 648 Bytes

Versions: 9

Compression:

Stored size: 648 Bytes

Contents

shared_context 'parse text' do |text|
  before { @result = Ircp.parse(text) }
  subject { @result }
  let(:result) { @result }
end

shared_context 'initialize message' do |*args|
  before { @result = Ircp::Message.new(*args) }
  subject { @result }
  let(:result) { @result }
end

shared_examples_for 'prefix for' do |options|
  subject { result.prefix }
  if options.nil?
    it { should be_nil }
  else
    options.each do |key, value|
      its(key) { should eq value }
    end
  end
end

shared_examples_for 'params for' do |*args|
  subject { result.params }
  args.each.with_index do |arg, index|
    its([index]) { should eq arg }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ircp-1.1.8 spec/support/shared_helpers.rb
ircp-1.1.7 spec/support/shared_helpers.rb
ircp-1.1.6 spec/support/shared_helpers.rb
ircp-1.1.5 spec/support/shared_helpers.rb
ircp-1.1.4 spec/support/shared_helpers.rb
ircp-1.1.3 spec/support/shared_helpers.rb
ircp-1.1.2 spec/support/shared_helpers.rb
ircp-1.1.1 spec/support/shared_helpers.rb
ircp-1.1.0 spec/support/shared_helpers.rb