Updated mcollective.init according to OSCI-658
[packages/precise/mcollective.git] / spec / unit / rpc_spec.rb
diff --git a/spec/unit/rpc_spec.rb b/spec/unit/rpc_spec.rb
new file mode 100755 (executable)
index 0000000..2ec96d2
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env rspec
+
+require 'spec_helper'
+
+module MCollective
+  describe RPC do
+    describe "#const_missing" do
+      it "should deprecate only the DDL class" do
+        Log.expects(:warn).with("MCollective::RPC::DDL is deprecatd, please use MCollective::DDL instead")
+        MCollective::RPC::DDL.should == MCollective::DDL
+
+        expect { MCollective::RPC::Foo }.to raise_error(NameError)
+      end
+    end
+  end
+end