Sha256: 3a33a07ac126fbcaf7dbf82d9e6334c388208a4ad895fa18ac3f46ad0545a877

Contents?: true

Size: 720 Bytes

Versions: 194

Compression:

Stored size: 720 Bytes

Contents

# encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann

module Inspec
  class RunnerMock
    attr_reader :tests, :profiles
    attr_writer :backend
    def initialize
      reset
    end

    def reset
      @tests = []
      @profiles = []
    end

    def add_profile(profile)
      @profiles.push(profile)
    end

    def add_test(example, _rule)
      @tests.push(example)
    end

    def example_group(*in_args, &in_block)
      Class.new do
        define_method :args do
          in_args
        end
        define_method :block do
          in_block
        end
      end
    end

    def run(_with = nil)
      puts 'uhm.... nothing or something... dunno, ask your admin'
    end
  end
end

Version data entries

194 entries across 194 versions & 2 rubygems

Version Path
inspec-core-4.3.2 lib/inspec/runner_mock.rb
inspec-4.3.2 lib/inspec/runner_mock.rb
inspec-core-4.2.0.preview lib/inspec/runner_mock.rb
inspec-4.2.0.preview lib/inspec/runner_mock.rb
inspec-core-4.1.4.preview lib/inspec/runner_mock.rb
inspec-4.1.4.preview lib/inspec/runner_mock.rb
inspec-core-3.9.3 lib/inspec/runner_mock.rb
inspec-3.9.3 lib/inspec/runner_mock.rb
inspec-core-3.9.0 lib/inspec/runner_mock.rb
inspec-3.9.0 lib/inspec/runner_mock.rb
inspec-core-3.7.11 lib/inspec/runner_mock.rb
inspec-3.7.11 lib/inspec/runner_mock.rb
inspec-core-3.7.1 lib/inspec/runner_mock.rb
inspec-3.7.1 lib/inspec/runner_mock.rb
inspec-core-3.6.6 lib/inspec/runner_mock.rb
inspec-3.6.6 lib/inspec/runner_mock.rb
inspec-core-3.6.4 lib/inspec/runner_mock.rb
inspec-3.6.4 lib/inspec/runner_mock.rb
inspec-core-2.3.28 lib/inspec/runner_mock.rb
inspec-2.3.28 lib/inspec/runner_mock.rb