Class: OrigenAppGenerators::TestEngineering::TestBlock

Inherits:
Plugin
  • Object
show all
Includes:
Common
Defined in:
lib/origen_app_generators/test_engineering/test_block.rb

Overview

Generates a generic plugin shell

Instance Method Summary collapse

Methods included from Common

#common_filelist

Methods inherited from Plugin

#get_additional_user_input

Methods inherited from Base

#get_common_user_input, #get_lastest_origen_version, #set_source_paths, #set_type, #validate_application_name

Constructor Details

#initialize(*args) ⇒ TestBlock

Returns a new instance of TestBlock.



9
10
11
12
# File 'lib/origen_app_generators/test_engineering/test_block.rb', line 9

def initialize(*args)
  @audience = :internal
  super
end

Instance Method Details

#concludeObject



31
32
33
# File 'lib/origen_app_generators/test_engineering/test_block.rb', line 31

def conclude
  puts "New test module created at: #{destination_root}"
end

#final_modificationsObject



27
28
29
# File 'lib/origen_app_generators/test_engineering/test_block.rb', line 27

def final_modifications
  prepend_to_file "app/lib/#{@name}.rb", "require 'origen_testers'\n"
end

#generate_filesObject



20
21
22
23
24
25
# File 'lib/origen_app_generators/test_engineering/test_block.rb', line 20

def generate_files
  @runtime_dependencies = [
    ['origen_testers', '>= 0.6.1']
  ]
  build_filelist
end

#get_user_inputObject



14
15
16
17
18
# File 'lib/origen_app_generators/test_engineering/test_block.rb', line 14

def get_user_input
  # The methods to get the common user input that applies to all applications will
  # get called at the start automatically, you have a chance here to ask any additional
  # questions that are specific to the type of application being generated
end