mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Bumping train to 0.29.1 (#2306)
* Bumping train to 0.29 Train 0.29 includes some bug fixes and a refactor of the File classes Signed-off-by: Adam Leff <adam@leff.co> * Correct unit test for undefined platform Train requires that a hash is supplied when mocking an OS. Because an OS of "unsupported" rather than "undefined" was chosen in a unit test, a nil was passed to train and it caused a failure. Signed-off-by: Adam Leff <adam@leff.co> * Ensure 0.29.1 or later gets picked up, but 0.30 is also acceptable Signed-off-by: Adam Leff <adam@leff.co>
This commit is contained in:
parent
d8aea65849
commit
18faaa42de
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|||
|
||||
spec.required_ruby_version = '>= 2.1'
|
||||
|
||||
spec.add_dependency 'train', '~> 0.28'
|
||||
spec.add_dependency 'train', '~> 0.29', '>= 0.29.1'
|
||||
spec.add_dependency 'thor', '~> 0.19'
|
||||
spec.add_dependency 'json', '>= 1.8', '< 3.0'
|
||||
spec.add_dependency 'rainbow', '~> 2'
|
||||
|
|
|
@ -69,7 +69,7 @@ describe Inspec::Resources::FileResource do
|
|||
proc { resource.send('executable?', 'by_usergroup', nil) }.must_raise(RuntimeError)
|
||||
end
|
||||
it 'responds with errors on unsupported OS' do
|
||||
resource = MockLoader.new(:unsupported).load_resource('file', 'C:/fakepath/fakefile')
|
||||
resource = MockLoader.new(:undefined).load_resource('file', 'C:/fakepath/fakefile')
|
||||
resource.stubs(:exist?).returns(true)
|
||||
_(resource.exist?).must_equal true
|
||||
_(resource.readable?('by_usergroup', 'by_specific_user')).must_equal '`readable?` is not supported on your OS yet.'
|
||||
|
|
Loading…
Reference in a new issue