Class: Simmer::Bootstrap

Inherits:
Object
  • Object
show all
Defined in:
lib/simmer/bootstrap.rb

Overview

:nodoc: Responsible for creating core objects needed to run tests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_path:, simmer_dir:, spec_path: nil, console_out: $stdout, callback_configuration: Configuration::CallbackDsl.new) ⇒ Bootstrap

Returns a new instance of Bootstrap.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/simmer/bootstrap.rb', line 16

def initialize(
  config_path:,
  simmer_dir:,
  spec_path: nil,
  console_out: $stdout,
  callback_configuration: Configuration::CallbackDsl.new
)
  @spec_path = spec_path.to_s
  raw_config = yaml_reader.smash(config_path)
  @configuration = Configuration.new(raw_config, simmer_dir, callbacks: callback_configuration)
  @console_out = console_out
  @callback_configuration = callback_configuration

  freeze
end

Instance Attribute Details

#callback_configurationObject (readonly)

Returns the value of attribute callback_configuration.



14
15
16
# File 'lib/simmer/bootstrap.rb', line 14

def callback_configuration
  @callback_configuration
end

#configurationObject (readonly)

Returns the value of attribute configuration.



14
15
16
# File 'lib/simmer/bootstrap.rb', line 14

def configuration
  @configuration
end

#console_outObject (readonly)

Returns the value of attribute console_out.



14
15
16
# File 'lib/simmer/bootstrap.rb', line 14

def console_out
  @console_out
end

#spec_pathObject (readonly)

Returns the value of attribute spec_path.



14
15
16
# File 'lib/simmer/bootstrap.rb', line 14

def spec_path
  @spec_path
end

Instance Method Details

#run_suiteObject



32
33
34
# File 'lib/simmer/bootstrap.rb', line 32

def run_suite
  suite.run(specs)
end