Skip to content

Commit

Permalink
update to rspec 1 and use some of the new matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Dec 7, 2013
1 parent 7b216fa commit c35a062
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -79,6 +79,6 @@ DEPENDENCIES
puppet-syntax
puppetlabs_spec_helper
rake
rspec-puppet
rspec-puppet (~> 1.0.0)
travis
travis-lint
10 changes: 6 additions & 4 deletions spec/classes/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
: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') }
Expand Down

0 comments on commit c35a062

Please sign in to comment.