inspec/test/unit/resources/sys_info_test.rb
Ryan Davis adaf2bc364 Removed aws resource requiring from test/helper and inspec/resource.
This speeds up parallel unit test runs from a very consistent 2:49 to
a very consistent 1:53, or a 33% reduction.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 17:58:02 -07:00

21 lines
689 B
Ruby

require 'helper'
describe 'Inspec::Resources::SysInfo' do
describe 'sys_info' do
it 'check ssh config parsing for Ubuntu' do
resource = MockLoader.new(:ubuntu1504).load_resource('sys_info')
_(resource.hostname).must_equal 'example.com'
end
it 'check ssh config parsing for Ubuntu' do
resource = MockLoader.new(:windows).load_resource('sys_info')
_(resource.hostname).must_equal 'WIN-CIV7VMLVHLD'
end
it 'check ssh config parsing for freebsd' do
resource = MockLoader.new(:freebsd10).load_resource('sys_info')
_(resource.hostname).must_equal 'The `sys_info.hostname` resource is not supported on your OS yet.'
end
end
end