Module: Avm::Rspec::Setup

Defined in:
lib/avm/rspec/setup.rb,
lib/avm/rspec/setup/launcher.rb,
lib/avm/rspec/setup/source_generator.rb

Defined Under Namespace

Modules: Launcher, SourceGenerator

Constant Summary collapse

EXAMPLES =
%w[avm_file_formats_with_fixtures avm_file_format_file_resource_name
avm_source_generated entries_values in_avm_registry not_in_avm_registry
with_config].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(obj) ⇒ Object



14
15
16
17
18
# File 'lib/avm/rspec/setup.rb', line 14

def self.extended(obj)
  obj.setup_examples
  obj.rspec_config.include(::Avm::Rspec::Setup::Launcher)
  obj.rspec_config.include(::Avm::Rspec::Setup::SourceGenerator)
end

Instance Method Details

#setup_examplesObject



20
21
22
23
24
# File 'lib/avm/rspec/setup.rb', line 20

def setup_examples
  EXAMPLES.each do |example|
    require "avm/rspec/shared_examples/#{example}"
  end
end

#stub_avm_contextsself

Returns:

  • (self)


27
28
29
30
31
32
33
# File 'lib/avm/rspec/setup.rb', line 27

def stub_avm_contexts
  stub_eac_config_node
  stub_eac_fs_contexts
  stub_eac_speaker

  self
end