aboutsummaryrefslogtreecommitdiff
path: root/spec/classes
diff options
context:
space:
mode:
authorNan Liu <nan@puppetlabs.com>2012-05-01 16:16:10 -0700
committerNan Liu <nan@puppetlabs.com>2012-05-01 16:16:10 -0700
commitc83ffff9493443845c1545240f75d8136c0ecdff (patch)
tree2a4f1450709f3559bf2b6cad95c7efe04011161b /spec/classes
parentdf6c470fd39e6e4e92968d414ae9021b4ec67205 (diff)
downloadpuppet-tftp-c83ffff9493443845c1545240f75d8136c0ecdff.tar.gz
puppet-tftp-c83ffff9493443845c1545240f75d8136c0ecdff.tar.bz2
Add support files for initial release.
* Update documentation. * Fix puppet-lint 80 char issues. * Add spec tests. * Add modulefile, changelog, rakefile, and license.
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/tftp_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/classes/tftp_spec.rb b/spec/classes/tftp_spec.rb
new file mode 100644
index 0000000..3e17286
--- /dev/null
+++ b/spec/classes/tftp_spec.rb
@@ -0,0 +1,28 @@
+require 'spec_helper'
+describe 'tftp', :type => :class do
+
+ describe 'when deploying on debian' do
+ let(:facts) { { :operatingsystem => 'Debian',
+ :path => '/usr/local/bin:/usr/bin:/bin', } }
+
+ it { should contain_file('/etc/default/tftpd-hpa') }
+ it { should contain_package('tftpd-hpa') }
+ it { should contain_service('tftpd-hpa').with({
+ 'hasstatus' => false,
+ 'provider' => nil,
+ }) }
+ end
+
+ describe 'when deploying on ubuntu' do
+ let(:facts) { { :operatingsystem => 'ubuntu',
+ :path => '/usr/local/bin:/usr/bin:/bin', } }
+
+ it { should contain_package('tftpd-hpa') }
+ it { should contain_file('/etc/default/tftpd-hpa') }
+ it { should contain_service('tftpd-hpa').with({
+ 'hasstatus' => true,
+ 'provider' => 'upstart',
+ }) }
+ end
+
+end