Get all non-resource tests fixed again.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-05-24 16:47:59 -07:00
parent de8258c9f7
commit 9ec91484fc
12 changed files with 23 additions and 4 deletions

View file

@ -1,5 +1,5 @@
require 'helper'
require 'inspec-supermarket/api'
require 'bundles/inspec-supermarket/api'
def default_url?(supermarket_url)
supermarket_url == Supermarket::API::SUPERMARKET_URL

View file

@ -1,6 +1,8 @@
require 'helper'
require 'inspec/config'
require 'inspec/runner_mock'
require 'fetchers/mock'
describe 'controls' do
def load(content)
@ -8,7 +10,11 @@ describe 'controls' do
'inspec.yml' => "name: mock",
'controls/mock.rb' => "control '1' do\n#{content}\nend\n",
}
opts = { test_collector: Inspec::RunnerMock.new, backend: Inspec::Backend.create(Inspec::Config.mock) }
opts = {
test_collector: Inspec::RunnerMock.new,
backend: Inspec::Backend.create(Inspec::Config.mock)
}
Inspec::Profile.for_target(data, opts)
.params[:controls]['1']
end

View file

@ -1,6 +1,7 @@
require 'helper'
require 'inspec/runner_mock'
require 'inspec/runner'
describe 'inspec keyword' do
def load(content)

View file

@ -1,5 +1,6 @@
require 'helper'
require 'fetchers/mock'
describe Fetchers::Mock do
let(:fetcher) { Fetchers::Mock }

View file

@ -1,6 +1,7 @@
# copyright: 2017, Chef Software Inc.
require 'helper'
require 'inspec/impact'
describe 'Impact' do
let(:impact) { Inspec::Impact }

View file

@ -2,6 +2,7 @@
require 'helper'
require 'inspec/profile_context'
require 'inspec/runner_mock'
describe 'resource exception' do
let(:profile) do

View file

@ -1,6 +1,9 @@
require 'helper'
require 'inspec/profile_context'
require 'inspec/runner_mock'
require 'inspec/resource'
require 'inspec/resources/command'
describe Inspec::Profile do
let(:logger) { Minitest::Mock.new }

View file

@ -2,6 +2,7 @@
require 'helper'
require 'inspec/secrets'
require 'inspec/runner'
describe Inspec::Runner do
let(:runner) { Inspec::Runner.new({ command_runner: :generic }) }

View file

@ -1,5 +1,6 @@
require 'helper'
require 'inspec/utils/parser'
describe BsdMountParser do
let (:parser) { Class.new() { include BsdMountParser }.new }

View file

@ -1,6 +1,8 @@
require 'helper'
require 'utils/find_files'
require 'inspec/utils/find_files'
require 'inspec/resources/command'
describe FindFiles do
let (:helper) do

View file

@ -1,5 +1,6 @@
require 'helper'
require 'inspec/utils/parser'
describe PasswdParser do
let (:parser) { Class.new() { include PasswdParser }.new }

View file

@ -1,5 +1,6 @@
require 'helper'
require 'inspec/utils/parser'
describe SolarisNetstatParser do
let (:parser) { Class.new() { include SolarisNetstatParser }.new }