Sha256: 2e613ead1f0503523fb0ba185232d247f84380920e25ec941d08286402e56665

Contents?: true

Size: 735 Bytes

Versions: 3

Compression:

Stored size: 735 Bytes

Contents

require 'spec_helper'

describe AQL::Buffer, '#parentheses' do
  let(:object) { described_class.new }

  subject { object.parentheses(*arguments, &block) }

  let(:block) { proc { object.append('foo') } }

  context 'without arguments' do
    let(:arguments) { [] }

    its(:content) { should eql('(foo)') }

    it_should_behave_like 'a command method'
  end

  context 'with first argument' do
    let(:arguments) { ['first '] }

    its(:content) { should eql('first foo)') }

    it_should_behave_like 'a command method'
  end

  context 'with first and second argument' do
    let(:arguments) { ['first ', ' second'] }

    its(:content) { should eql('first foo second') }

    it_should_behave_like 'a command method'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aql-0.0.3 spec/unit/aql/buffer/parentheses_spec.rb
aql-0.0.2 spec/unit/aql/buffer/parentheses_spec.rb
aql-0.0.1 spec/unit/aql/buffer/parentheses_spec.rb