Sha256: 50e6fc565db0a20d342b5bc2b054f213757bd22c9b7ed482fff142dcdf76c384
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
require_relative '../spec_helper' require 'wright/resource/package' describe Wright::Resource::Package do before(:each) do @package = Wright::Resource::Package.new('foo') @provider = Minitest::Mock.new @package.instance_variable_set(:@provider, @provider) end describe '#installed_versions' do it 'should ask the provider for installed versions' do @provider.expect(:installed_versions, nil) @package.installed_versions @provider.verify end end describe '#installed?' do it 'should ask the provider for the install status' do @provider.expect(:installed?, nil) @package.installed? @provider.verify end end describe '#install' do it 'should ask the provider to install the package' do @provider.expect(:install, nil) @provider.expect(:updated?, true) @package.install @provider.verify end end describe '#remove' do it 'should ask the provider to remove the package' do @provider.expect(:remove, nil) @provider.expect(:updated?, true) @package.remove @provider.verify end end end
Version data entries
5 entries across 5 versions & 1 rubygems