Skip to content

Commit

Permalink
Update test package versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandoaleman committed Oct 14, 2018
1 parent 58c1f49 commit 960931d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions spec/unit/resources/asdf_package_spec.rb
Expand Up @@ -17,6 +17,10 @@
it 'installs ruby package' do
expect(chef_run).to install_asdf_package('ruby')
end

it 'installs php package' do
expect(chef_run).to install_asdf_package('php')
end
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/cookbooks/test/recipes/asdf_package.rb
Expand Up @@ -4,21 +4,21 @@

asdf_package 'nodejs' do
user 'vagrant'
version '8.7.0'
version '10.12.0'
live_stream true
action [:install, :global]
end

asdf_package 'ruby' do
user 'vagrant'
version '2.4.2'
version '2.5.1'
live_stream true
action [:install, :global]
end

asdf_package 'php' do
user 'vagrant'
version '5.6.32'
version '7.2.11'
live_stream true
action [:install, :global]
end
24 changes: 12 additions & 12 deletions test/smoke/default/default_test.rb
Expand Up @@ -72,36 +72,36 @@
control 'asdf_package' do
title 'Installs, uninstalls and sets global asdf packages'

desc 'Installs nodejs 8.7.0'
desc 'Installs nodejs 10.12.0'
describe bash('sudo -H -u vagrant bash -c "source /etc/profile.d/asdf.sh && asdf list nodejs"') do
its('stdout') { should include('8.7.0') }
its('stdout') { should include('10.12.0') }
its('exit_status') { should eq 0 }
end

desc 'Sets nodejs 8.7.0 to global'
desc 'Sets nodejs 10.12.0 to global'
describe file('/home/vagrant/.tool-versions') do
its('content') { should include('nodejs 8.7.0') }
its('content') { should include('nodejs 10.12.0') }
end

desc 'Installs ruby 2.4.2'
desc 'Installs ruby 2.5.1'
describe bash('sudo -H -u vagrant bash -c "source /etc/profile.d/asdf.sh && asdf list ruby"') do
its('stdout') { should include('2.4.2') }
its('stdout') { should include('2.5.1') }
its('exit_status') { should eq 0 }
end

desc 'Sets ruby 2.4.2 to global'
desc 'Sets ruby 2.5.1 to global'
describe file('/home/vagrant/.tool-versions') do
its('content') { should include('ruby 2.4.2') }
its('content') { should include('ruby 2.5.1') }
end

desc 'Installs php 5.6.32'
desc 'Installs php 7.2.11'
describe bash('sudo -H -u vagrant bash -c "source /etc/profile.d/asdf.sh && asdf list php"') do
its('stdout') { should include('5.6.32') }
its('stdout') { should include('7.2.11') }
its('exit_status') { should eq 0 }
end

desc 'Sets php 5.6.32 to global'
desc 'Sets php 7.2.11 to global'
describe file('/home/vagrant/.tool-versions') do
its('content') { should include('php 5.6.32') }
its('content') { should include('php 7.2.11') }
end
end

0 comments on commit 960931d

Please sign in to comment.