summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-09-21 13:18:51 -0500
committerLuke Kanies <luke@madstop.com>2007-09-21 13:18:51 -0500
commit7e2ff4b39404ad9b0bdbc40d92c80bcb8c76fcf6 (patch)
tree25767ebbea5aa5b1a46f3d366c8b2d815a016774 /spec
parent7740cd497f936859fa5213c34dae485b5b70ba60 (diff)
Adding a couple more tests to the indirector, talking about
terminus registration. I am about to change how loading is handled, so that individual termini are declared as normal Ruby classes.
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/indirector/indirector.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/indirector/indirector.rb b/spec/unit/indirector/indirector.rb
index 2e22090b0..23637ec7c 100755
--- a/spec/unit/indirector/indirector.rb
+++ b/spec/unit/indirector/indirector.rb
@@ -36,6 +36,11 @@ describe Puppet::Indirector, "when registering an indirection" do
Proc.new { @thingie.indirects :second }.should raise_error(ArgumentError)
end
+ it "should set up instance loading for the indirection" do
+ Puppet::Indirector.expects(:instance_load).with(:test, "puppet/indirector/test")
+ @indirection = @thingie.indirects(:test)
+ end
+
after do
@indirection.delete if @indirection
end
@@ -79,6 +84,14 @@ describe Puppet::Indirector, " when redirecting model" do
end
end
+describe Puppet::Indirector, " when retrieving terminus classes" do
+ it "should allow terminus classes to register themselves"
+
+ it "should provide a method to retrieve a terminus class by name and indirection" do
+ Puppet::Indirector.expects(:loaded_instance).with(:indirection, :terminus)
+ Puppet::Indirector.terminus(:indirection, :terminus)
+ end
+end
# describe Puppet::Indirector::Terminus do