Class: Gotsha::Actions::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/gotsha/actions/test.rb

Constant Summary collapse

DESCRIPTION =
"runs and stores tests (don't use this; prefer autorun via hooks, or `gotsha commit`)"
TESTS_PASSED_NOTE_PREFIX =
"Tests passed:"
TESTS_FAILED_NOTE_PREFIX =
"Tests failed:"

Instance Method Summary collapse

Constructor Details

#initializeTest

Returns a new instance of Test.



11
12
13
# File 'lib/gotsha/actions/test.rb', line 11

def initialize
  @tests_text_outputs = []
end

Instance Method Details

#callObject



15
16
17
18
19
20
21
# File 'lib/gotsha/actions/test.rb', line 15

def call
  ensure_commands_defined!
  run_commands!
  create_git_note!(TESTS_PASSED_NOTE_PREFIX)

  "commit verified"
end