spec/connection_spec.rb in jsparrow-1.1.3 vs spec/connection_spec.rb in jsparrow-1.1.4
- old
+ new
@@ -4,11 +4,11 @@
subject do
configure_connection
end
- context 'When configured' do
+ context 'when configured' do
it 'should known a jms_client_jar' do
subject.jms_client_jar.should_not be nil
end
@@ -31,17 +31,24 @@
it 'should have the test_topic enabled' do
subject.enabled_topics[:test_topic].should_not be nil
end
it 'should allow create a new Client' do
- jms_client = create_jms_client
+ jms_client = new_jms_client
- jms_client.class.should be JSparrow::Connection::Client
+ jms_client.class.should be JSparrow::Interactors::Client
end
- it 'should allow create a new Listener' do
- jms_listener = create_jms_listener
+ it 'should allow create a new named Listener' do
+ jms_listener = new_named_jms_listener
- jms_listener.class.superclass.should be JSparrow::Connection::Listener
+ jms_listener.class.superclass.should be JSparrow::Interactors::Listener
+ end
+
+ it 'should allow create a new anonymous Listener' do
+ jms_listener = new_anonymous_jms_listener
+
+ jms_listener.class.should be JSparrow::Interactors::Listener
+ jms_listener.respond_to?(:on_receive_message).should be true
end
end
end
\ No newline at end of file