require 'spec_helper'
describe 'patchwork' do

  context 'with defaults for all parameters' do
    it { should contain_class('patchwork') }
  end
end

require 'spec_helper'
describe 'patchwork', :type => 'class' do

  context 'with defaults for all parameters' do
    let (:facts) do { 
        :osfamily => 'RedHat',
        :operatingsystem => 'CentOS',
    }
    end

    it { should contain_class('patchwork') }

    it { should contain_package('git').with_ensure('installed') }

    it do
      should contain_vcsrepo('/opt/patchwork').with(
        'ensure'   => 'present',
        'provider' => 'git',
        'source'   => 'git://github.com/getpatchwork/patchwork',
      )
    end
  end
end

Define facts in init spec test
Define facts in init spec test

Without any facts defined for the OS, epel, python, and other modules
fail to compile causing the tests to fail.

Signed-off-by: Trevor Bramwell <9318f446584e3f6cf68dea37a1a9fde63cb30ce1@linuxfoundation.org>
