Sha256: fb49eecb6e9b429f5c7f8b57240886c56733bf759844947bc53187de3af22af0

Contents?: true

Size: 930 Bytes

Versions: 4

Compression:

Stored size: 930 Bytes

Contents

# frozen_string_literal: true

require 'avm/rspec/setup/source_generator'
require 'eac_ruby_utils/core_ext'

module Avm
  module Rspec
    module Setup
      require_sub __FILE__
      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 with_launcher].freeze

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

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

      # @return [self]
      def stub_avm_contexts
        stub_eac_config_node
        stub_eac_fs_contexts
        stub_eac_speaker

        self
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
avm-0.94.1 lib/avm/rspec/setup.rb
eac_tools-0.98.0 sub/avm/lib/avm/rspec/setup.rb
avm-0.94.0 lib/avm/rspec/setup.rb
eac_tools-0.94.0 sub/avm/lib/avm/rspec/setup.rb