Sha256: d1b18900bc3be906d07625119121c23bbfc89f0d26f1c04391f23c75d0a28cc8

Contents?: true

Size: 442 Bytes

Versions: 2

Compression:

Stored size: 442 Bytes

Contents

require 'spec_helper'

describe Substation::Environment::DSL, '.registry' do
  context "when a block is given" do
    subject { described_class.registry(&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
    subject { described_class.registry }

    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/class_methods/registry_spec.rb
substation-0.0.8 spec/unit/substation/environment/dsl/class_methods/registry_spec.rb