Sha256: 433d1bb1707030984887789f9594d32e4c9b635f2d5246e0604150ff223f507a

Contents?: true

Size: 900 Bytes

Versions: 2

Compression:

Stored size: 900 Bytes

Contents

shared_examples_for 'a processor' do |options = {}|
  it 'is registered' do
    Wukong.registry.retrieve(options[:named].to_sym).should_not be_nil
  end
  it{ processor(options[:named]).processor.should respond_to(:setup)    }
  it{ processor(options[:named]).processor.should respond_to(:process)  }
  it{ processor(options[:named]).processor.should respond_to(:finalize) }
  it{ processor(options[:named]).processor.should respond_to(:stop)     }
  it{ processor(options[:named]).processor.should respond_to(:notify)   }
end

shared_examples_for 'a plugin' do |options = {}|
  it "is registered as a Wukong plugin " do
    Wukong::PLUGINS.should include(subject)
  end
  it { should respond_to(:configure) }
  it { should respond_to(:boot)      }
end

shared_examples_for 'a model class' do |options = {}|
  it        { should respond_to(:receive) }
  its(:new) { should respond_to(:to_wire) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wukong-3.0.1 lib/wukong/spec_helpers/shared_examples.rb
wukong-3.0.0 lib/wukong/spec_helpers/shared_examples.rb