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:
Adam Leff 2017-11-13 16:02:27 -05:00 committed by GitHub
parent d8aea65849
commit 18faaa42de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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'

View file

@ -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.'