-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added puppet module metadata for the forge.
- Loading branch information
mosen
committed
Feb 16, 2012
1 parent
bfb884a
commit 89a67fc
Showing
5 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name 'cups' | ||
author 'mosen' | ||
description 'CUPS printer management' | ||
source 'https://github.com/mosen/puppet-cups.git' | ||
summary 'This module manages printers and printer default options in CUPS via the cups command line utilities' | ||
license 'GPLv3' | ||
version '0.0.1' |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env rspec | ||
|
||
# TODO: cant require spec_helper outside of puppet tree? | ||
|
||
printer = Puppet::Type.type(:printer) | ||
|
||
describe printer do | ||
before do | ||
#ENV["PATH"] += File::PATH_SEPARATOR + "/usr/sbin" unless ENV["PATH"].split(File::PATH_SEPARATOR).include?("/usr/sbin") | ||
@provider = stub 'provider' | ||
#@resource = stub 'resource', :resource => nil, :provider => @provider, :line => nil, :file => nil | ||
end | ||
|
||
it "should have a default provider inheriting from Puppet::Provider" do | ||
printer.defaultprovider.ancestors.should be_include(Puppet::Provider) | ||
end | ||
|
||
it "should be able to create a instance" do | ||
printer.new(:name => "foo").should_not be_nil | ||
end | ||
|
||
describe "instances" do | ||
it "should have a valid provider" do | ||
printer.new(:name => "foo").provider.class.ancestors.should be_include(Puppet::Provider) | ||
end | ||
|
||
it "should delegate existence questions to its provider" do | ||
instance = printer.new(:name => "foo") | ||
instance.provider.expects(:exists?).returns "eh" | ||
instance.exists?.should == "eh" | ||
end | ||
end | ||
|
||
properties = [:ensure, :name, :uri, :description, :location, :ppd, :enabled, :shared, :options] | ||
|
||
properties.each do |property| | ||
it "should have a #{property} property" do | ||
printer.attrclass(property).ancestors.should be_include(Puppet::Property) | ||
end | ||
|
||
it "should have documentation for its #{property} property" do | ||
printer.attrclass(property).doc.should be_instance_of(String) | ||
end | ||
end | ||
|
||
|
||
end |