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].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(obj) ⇒ Object



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

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



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

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

#stub_avm_contextsself

Returns:

  • (self)


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

def stub_avm_contexts
  stub_eac_config_node
  stub_eac_fs_contexts
  stub_eac_speaker

  self
end