Sha256: bf7fb3eac1a0a846c64d663e99de3a70e7cd10f6b3d7d6ab98458b1cc98fd634

Contents?: true

Size: 559 Bytes

Versions: 19

Compression:

Stored size: 559 Bytes

Contents

require 'spec_helper'

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

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

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

  # Yeah duplicate, mutant will be improved ;)
  it 'should prefix with indentation if line is empty' do
    object.append('foo')
    object.indent
    object.append('bar')
    object.append('baz')
    expect(object.content).to eql("foo\n  barbaz")
  end

  it_should_behave_like 'a command method'
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
unparser-0.1.2 spec/unit/unparser/buffer/append_spec.rb
unparser-0.1.1 spec/unit/unparser/buffer/append_spec.rb
unparser-0.1.0 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.18 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.16 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.15 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.14 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.13 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.12 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.11 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.10 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.8 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.7 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.6 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.5 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.4 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.3 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.2 spec/unit/unparser/buffer/append_spec.rb
unparser-0.0.1 spec/unit/unparser/buffer/append_spec.rb