Sha256: 8a37ca1bc8308de69ddfe10a6bf0fc2187cd4c9b4007afb6003489ce33d62239

Contents?: true

Size: 605 Bytes

Versions: 16

Compression:

Stored size: 605 Bytes

Contents

# encoding: utf-8

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

16 entries across 16 versions & 1 rubygems

Version Path
unparser-0.2.4 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.3 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.2 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.1 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.2.0 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.16 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.15 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.14 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.13 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.12 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.11 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.10 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.9 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.8 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.7 spec/unit/unparser/buffer/append_without_prefix_spec.rb
unparser-0.1.6 spec/unit/unparser/buffer/append_without_prefix_spec.rb