Sha256: bbc17a8628d6fe2a51b08622dec074477f0f9e80c217ec7bab16c58485554b3d

Contents?: true

Size: 1.19 KB

Versions: 7

Compression:

Stored size: 1.19 KB

Contents

#!/usr/bin/env rspec

require 'spec_helper'

MCollective::PluginManager.clear

require File.dirname(__FILE__) + '/../../../../../../plugins/mcollective/connector/stomp.rb'

module MCollective
  module Connector
    class Stomp
      describe EventLogger do
        before do
        end

        it "should have valid call back methods" do
          plugin = EventLogger.new

          [:on_miscerr, :on_connecting, :on_connected, :on_disconnect, :on_connectfail, :on_ssl_connecting, :on_ssl_connected].each do |meth|
            plugin.respond_to?(meth).should == true
          end
        end

        describe "#stomp_url" do
          it "should create valid stomp urls" do
            EventLogger.new.stomp_url({:cur_login => "rspec", :cur_host => "localhost", :cur_port => 123}).should == "stomp://rspec@localhost:123"
            EventLogger.new.stomp_url({:cur_login => "rspec", :cur_host => "localhost", :cur_port => 123, :cur_ssl => false}).should == "stomp://rspec@localhost:123"
            EventLogger.new.stomp_url({:cur_login => "rspec", :cur_host => "localhost", :cur_port => 123, :cur_ssl => true}).should == "stomp+ssl://rspec@localhost:123"
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mcollective-client-2.2.4 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
mcollective-client-2.2.3 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
mcollective-client-2.2.2 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
mcollective-client-2.2.1 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
mcollective-client-2.2.0 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
mcollective-client-2.0.0 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
mcollective-client-1.3.3 spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb