Sha256: 3ebcf3204fe13bd6d90b0817df9343e89bb3c76734de30ad4216687dd2caf0f7

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

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)    { lambda { |_| 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

2 entries across 2 versions & 1 rubygems

Version Path
substation-0.0.10.beta2 spec/unit/substation/environment/dsl/registry_spec.rb
substation-0.0.8 spec/unit/substation/environment/dsl/registry_spec.rb