summaryrefslogtreecommitdiff
path: root/spec/classes/couchdb_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/classes/couchdb_spec.rb')
-rw-r--r--spec/classes/couchdb_spec.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/classes/couchdb_spec.rb b/spec/classes/couchdb_spec.rb
new file mode 100644
index 0000000..0dd069a
--- /dev/null
+++ b/spec/classes/couchdb_spec.rb
@@ -0,0 +1,35 @@
+require 'spec_helper'
+
+describe 'couchdb' do
+ context 'given it is a wheezy system' do
+ let(:params) { {:admin_pw => 'foo'} }
+ let(:facts) do
+ {
+ :operatingsystemmajrelease => '7',
+ :operatingsystem => 'Debian',
+ :lsbdistcodename => 'wheezy',
+ }
+ end
+ it "should install couchrest 1.2" do
+ should contain_package('couchrest').with({
+ 'ensure'=> '1.2',
+ })
+ end
+ end
+ context 'given it is a jessie system' do
+ let(:params) { {:admin_pw => 'foo'} }
+ let(:facts) do
+ {
+ :operatingsystemmajrelease => '8',
+ :operatingsystem => 'Debian',
+ :lsbdistcodename => 'jessie',
+ }
+ end
+ it "should install latest couchrest version" do
+ should contain_package('couchrest').with({
+ 'ensure'=> 'latest',
+ })
+ end
+ end
+end
+