Sha256: d1d8f20f2341cea0ef78ae37e447c0b66a79c27ece86b66c441dd0f1a3d7d1ea

Contents?: true

Size: 528 Bytes

Versions: 12

Compression:

Stored size: 528 Bytes

Contents

require 'spec_helper'

describe Unparser::Emitter::SourceMap, '.emit' do
  let(:object)  { described_class           }
  let(:subject) { object.emit(node, buffer) }
  let(:buffer)  { Unparser::Buffer.new      }

  let(:node) do
    double('Node',
      :type => :foo,
      :location => double('SourceMap',
        :expression => double('SourceRange', :source => 'foo')
      )
    )
  end

  it 'should append source map expression to buffer' do
    expect { subject }.to change { buffer.content }.from('').to('foo')
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
unparser-0.1.3 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.1.2 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.1.1 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.1.0 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.18 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.16 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.15 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.14 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.13 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.12 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.11 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb
unparser-0.0.10 spec/unit/unparser/emitter/source_map/class_methods/emit_spec.rb