summaryrefslogtreecommitdiff
path: root/spec/classes/couchdb_spec.rb
blob: 0dd069a05c555550ecda9d08fb22df3ee74ebc8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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