update to rspec 1 and use some of the new matchers

This commit is contained in:
Gareth Rushgrove 2013-12-07 12:49:18 +00:00
Родитель 7b216fac02
Коммит c35a06289b
3 изменённых файлов: 17 добавлений и 15 удалений

Просмотреть файл

@ -3,7 +3,7 @@ source "http://rubygems.org"
gem "rake"
gem "puppet", ENV['PUPPET_VERSION'] || '~> 2.7.0'
gem "puppet-lint"
gem "rspec-puppet"
gem "rspec-puppet", '~> 1.0.0'
gem "puppet-syntax"
gem "puppetlabs_spec_helper"
gem "travis"

Просмотреть файл

@ -4,7 +4,7 @@ GEM
addressable (2.3.3)
backports (2.8.2)
coderay (1.0.9)
diff-lcs (1.2.1)
diff-lcs (1.2.5)
facter (1.6.18)
faraday (0.8.7)
multipart-post (~> 1.1)
@ -46,15 +46,15 @@ GEM
rspec (>= 2.9.0)
rspec-puppet (>= 0.1.1)
rake (10.0.4)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
rspec-puppet (0.1.6)
rspec-mocks (2.14.4)
rspec-puppet (1.0.1)
rspec
slop (3.4.4)
travis (1.2.0)
@ -79,6 +79,6 @@ DEPENDENCIES
puppet-syntax
puppetlabs_spec_helper
rake
rspec-puppet
rspec-puppet (~> 1.0.0)
travis
travis-lint

Просмотреть файл

@ -7,13 +7,15 @@ describe 'docker', :type => :class do
:kernelrelease => '3.8.0-29-generic'
} }
it { should include_class('docker::install') }
it { should include_class('docker::service') }
it { should include_class('docker::config') }
it { should compile.with_all_deps }
it { should contain_class('docker::install').that_comes_before('docker::config') }
it { should contain_class('docker::service').that_subscribes_to('docker::config') }
it { should contain_class('docker::config') }
it { should contain_service('docker').with_provider('upstart') }
context 'with no parameters' do
it { should include_class('apt') }
it { should contain_class('apt') }
it { should contain_package('lxc-docker').with_ensure('present') }
it { should contain_apt__source('docker') }
it { should contain_package('linux-image-extra-3.8.0-29-generic') }