Sha256: 0b1ea718b293cceb51be5fdf20c23e88a6eee35649fe49713565d89805c3db17

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Substation::Environment::DSL, '#registry' do
  subject { object.registry }

  context 'when a block is given' do
    let(:object)   { described_class.new(&block) }
    let(:block)    { ->(_) { register :test, Spec::Processor } }
    let(:expected) { { :test => Spec::Processor } }

    it { should eql(expected) }
  end

  context 'when no block is given' do
    let(:object) { described_class.new }

    it { should eql({}) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
substation-0.0.9 spec/unit/substation/environment/dsl/registry_spec.rb