Sha256: e5acf5c13180baccbc1f1f4d62e435a67fa0c907ff839100dcccf05d605ed46d

Contents?: true

Size: 642 Bytes

Versions: 1

Compression:

Stored size: 642 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Chain::DSL, '#processors' do
  subject { object.processors }

  let(:processor) { Spec::FAKE_PROCESSOR }

  context "and a block is given" do
    let(:object)    { described_class.new(chain, &block) }
    let(:chain) { Chain::EMPTY }
    let(:block)     { lambda { |_| use(Spec::FAKE_PROCESSOR) } }

    it { should include(processor) }

    its(:length) { should == 1 }
  end

  context "and no block is given" do
    let(:object) { described_class.new(chain) }
    let(:chain)  { Chain.new([ processor ]) }

    it { should include(processor) }

    its(:length) { should == 1 }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
substation-0.0.8 spec/unit/substation/chain/dsl/processors_spec.rb