Sha256: b72985a01614b63cf6b06741534e8734f935f305cddef4a1f5b78daf0142565e

Contents?: true

Size: 421 Bytes

Versions: 16

Compression:

Stored size: 421 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Unparser::Emitter, '.handle' do
  subject { class_under_test.class_eval { handle :foo } }

  let(:class_under_test) do
    Class.new(described_class)
  end

  before do
    stub_const('Unparser::Emitter::REGISTRY', {})
  end

  it 'should register emitter' do
    expect { subject }.to change { Unparser::Emitter::REGISTRY }.from({}).to(foo: class_under_test)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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