Sha256: c404f6ea1f3831a24c4a05e03fbaf55669a8d730361de3fe8396de6cb1b71863

Contents?: true

Size: 655 Bytes

Versions: 31

Compression:

Stored size: 655 Bytes

Contents

#!/usr/bin/env rspec

require 'spec_helper'

module MCollective
  module Connector
    describe "base" do

      before :each do
        Base.unstub(:inherited)
      end

      it "should fail if the ddl isn't valid" do
        PluginManager.expects(:<<).never

        expect {
          class TestConnectorA<Connector::Base;end
        }.to raise_error RuntimeError
      end

      it "should load the ddl and add the connector to the PluginManager" do
        DDL.stubs(:new)
        class TestConnectorB<Connector::Base;end
        PluginManager["connector_plugin"].class.should == MCollective::Connector::TestConnectorB
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
mcollective-client-2.12.5 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.12.4 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.12.3 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.12.1 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.12.0 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.10.6 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.11.4 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.11.3 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.11.2 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.11.1 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.11.0 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.10.4 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.10.3 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.10.2 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.10.1 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.10.0 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.8.7 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.8.5 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.8.8 spec/unit/mcollective/connector/base_spec.rb
mcollective-client-2.8.6 spec/unit/mcollective/connector/base_spec.rb