Sha256: 1d0a398d210e07c31eb7504116eeced25f06e71277e7ca36ba63b686014e1b59

Contents?: true

Size: 443 Bytes

Versions: 14

Compression:

Stored size: 443 Bytes

Contents

require 'spec_helper'

describe Unparser::Emitter, '.handle', mutant_expression: 'Unparser::Emitter*' 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

14 entries across 14 versions & 1 rubygems

Version Path
unparser-0.4.8 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.7 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.6 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.5 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.4 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.3 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.2 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.1 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.4.0 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.3.0 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.2.8 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.2.7 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.2.6 spec/unit/unparser/emitter/class_methods/handle_spec.rb
unparser-0.2.5 spec/unit/unparser/emitter/class_methods/handle_spec.rb