diff options
author | Luke Kanies <luke@madstop.com> | 2007-09-21 13:42:39 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-09-21 13:42:39 -0500 |
commit | 0a48e5f5bf5885353edc20f020ae27eb682176f7 (patch) | |
tree | 8cef0815c83222d2db6f6861282fefecb290f096 /spec/unit | |
parent | 7e2ff4b39404ad9b0bdbc40d92c80bcb8c76fcf6 (diff) | |
download | puppet-0a48e5f5bf5885353edc20f020ae27eb682176f7.tar.gz puppet-0a48e5f5bf5885353edc20f020ae27eb682176f7.tar.xz puppet-0a48e5f5bf5885353edc20f020ae27eb682176f7.zip |
Moving the Puppet::Indirector::Terminus class into its
own file and adding a spec for it.
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/indirector/terminus.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/unit/indirector/terminus.rb b/spec/unit/indirector/terminus.rb new file mode 100755 index 000000000..9632aa22f --- /dev/null +++ b/spec/unit/indirector/terminus.rb @@ -0,0 +1,39 @@ +require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/defaults' +require 'puppet/indirector' + +describe Puppet::Indirector::Terminus do + it "should support the documentation methods" do + Puppet::Indirector::Terminus.should respond_to(:desc) + end + + # LAK:FIXME I don't really know the best way to test this kind of + # requirement. + it "should support a class-level name attribute" do + Puppet::Indirector::Terminus.should respond_to(:name) + Puppet::Indirector::Terminus.should respond_to(:name=) + end + + it "should support a class-level indirection attribute" do + Puppet::Indirector::Terminus.should respond_to(:indirection) + Puppet::Indirector::Terminus.should respond_to(:indirection=) + end +end + +describe Puppet::Indirector::Terminus, " when a terminus instance" do + before do + @terminus_class = Class.new(Puppet::Indirector::Terminus) do + @name = :test + @indirection = :whatever + end + @terminus = @terminus_class.new + end + + it "should return the class's name as its name" do + @terminus.name.should == :test + end + + it "should return the class's indirection as its indirection" do + @terminus.indirection.should == :whatever + end +end |