spec/miu/publisher_spec.rb in miu-0.2.1 vs spec/miu/publisher_spec.rb in miu-0.2.2
- old
+ new
@@ -22,6 +22,22 @@
it_should_behave_like 'publishable socket' do
let(:base) { MyPubSocket }
end
end
+
+ context 'include' do
+ before do
+ publisher = stub(Miu::Publisher)
+ Miu::Publisher.stub!(:new).and_return(publisher)
+
+ @klass = Class.new do
+ include Miu::Publisher
+ socket_type Miu::PubSocket
+ end
+ end
+
+ describe '#socket_type' do
+ it { expect(@klass.socket_type).to eq Miu::PubSocket }
+ end
+ end
end