Sha256: 979cee94ad8b5713961360fc735280f779766b0d7beef17b4245c48d2a668f84

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

require 'spec_helper'

describe FluQ::Feed do

  subject  { described_class.new "my-feed" }

  its(:name)     { should == "my-feed" }
  its(:handlers) { should == [] }
  its(:inputs)   { should == [] }

  it "should listen to inputs" do
    subject.listen(FluQ::Input::Socket, bind: "tcp://127.0.0.1:7654")
    subject.should have(1).inputs
  end

  it "should register handlers" do
    h1 = subject.register(FluQ::Handler::Test)
    subject.should have(1).handlers

    h2 = subject.register(FluQ::Handler::Test)
    subject.should have(2).handlers
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluq-0.8.1 spec/fluq/feed_spec.rb
fluq-0.8.0 spec/fluq/feed_spec.rb