Class: RedminePluginsHelper::TestTasks::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/redmine_plugins_helper/test_tasks/base.rb

Direct Known Subclasses

Minitest, Rspec

Constant Summary collapse

DEFAULT_TASK_NAME_LAST_PART =
'test'
PREPARE_TASK_NAME =
'db:test:prepare'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.register(plugin_id, task_name_last_part = DEFAULT_TASK_NAME_LAST_PART) ⇒ Object



13
14
15
# File 'lib/redmine_plugins_helper/test_tasks/base.rb', line 13

def register(plugin_id, task_name_last_part = DEFAULT_TASK_NAME_LAST_PART)
  new(plugin_id, task_name_last_part).register
end

Instance Method Details

#plugin_rootPathname

Returns:

  • (Pathname)


21
22
23
# File 'lib/redmine_plugins_helper/test_tasks/base.rb', line 21

def plugin_root
  ::Rails.root.join('plugins', plugin_id.to_s)
end

#prepare_task_nameString

Returns:

  • (String)


26
27
28
# File 'lib/redmine_plugins_helper/test_tasks/base.rb', line 26

def prepare_task_name
  PREPARE_TASK_NAME
end

#task_full_nameString

Returns:

  • (String)


31
32
33
# File 'lib/redmine_plugins_helper/test_tasks/base.rb', line 31

def task_full_name
  "#{plugin_id}:#{task_name_last_part}"
end