mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
parent
02913c45e5
commit
defe63dada
2 changed files with 33 additions and 0 deletions
|
@ -34,6 +34,8 @@ module Inspec
|
|||
attr_reader :backend, :rules
|
||||
attr_accessor :target_profiles
|
||||
|
||||
attr_accessor :test_collector
|
||||
|
||||
def attributes
|
||||
Inspec.deprecate(:rename_attributes_to_inputs, "Don't call runner.attributes, call runner.inputs")
|
||||
inputs
|
||||
|
|
|
@ -3,10 +3,41 @@
|
|||
require "helper"
|
||||
require "inspec/secrets"
|
||||
require "inspec/runner"
|
||||
require "fetchers/mock"
|
||||
|
||||
describe Inspec::Runner do
|
||||
let(:runner) { Inspec::Runner.new({ command_runner: :generic }) }
|
||||
|
||||
it "bug #4524" do
|
||||
file = <<-RUBY
|
||||
describe "a thing" do
|
||||
before(:all) { command("true") }
|
||||
it("should pass") {}
|
||||
end
|
||||
RUBY
|
||||
runner.add_target("bug4524.rb" => file)
|
||||
runner.load
|
||||
|
||||
result = RSpec::Core::Runner.new(nil).run_specs(runner.test_collector.tests)
|
||||
|
||||
_(result).must_equal 0
|
||||
end
|
||||
|
||||
it "bug #4587" do
|
||||
file = <<-RUBY
|
||||
describe "a thing" do
|
||||
subject! { command("true") }
|
||||
its("exit_status") { should eq 0 }
|
||||
end
|
||||
RUBY
|
||||
runner.add_target("bug4587.rb" => file)
|
||||
runner.load
|
||||
|
||||
result = RSpec::Core::Runner.new(nil).run_specs(runner.test_collector.tests)
|
||||
|
||||
_(result).must_equal 0
|
||||
end
|
||||
|
||||
# =============================================================== #
|
||||
# Reporter Options
|
||||
# =============================================================== #
|
||||
|
|
Loading…
Add table
Reference in a new issue