Sha256: 14a732a9db59f051d176bd51d70f08bb7758de8a93892efe37bba15c86649fab

Contents?: true

Size: 586 Bytes

Versions: 17

Compression:

Stored size: 586 Bytes

Contents

require 'spec_helper'

describe Unparser::Buffer, '#append_without_prefix' do
  subject { object.append_without_prefix(string) }

  let(:object) { described_class.new }
  let(:string) { 'foo' }

  specify do
    expect { subject }.to change { object.content }.from('').to('foo')
  end

  it 'should not prefix with indentation' do
    object.append_without_prefix('foo')
    object.nl
    object.indent
    object.append_without_prefix('bar')
    object.append_without_prefix('baz')
    expect(object.content).to eql("foo\nbarbaz")
  end

  it_should_behave_like 'a command method'
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
unparser-0.4.8 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.7 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.6 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.5 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.4 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.3 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.2 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.1 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.4.0 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.3.0 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.8 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.7 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.6 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.5 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.5 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.4 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.3 spec/unit/unparser/buffer/append_without_prefix_spec.rb