Class: Roger::Test::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/roger/test.rb

Overview

The Test CLI Thor command

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.stack_indexObject

Returns the value of attribute stack_index.



17
18
19
# File 'lib/roger/test.rb', line 17

def stack_index
  @stack_index
end

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/roger/test.rb', line 10

def self.exit_on_failure?
  true
end

Instance Method Details

#testObject



21
22
23
24
# File 'lib/roger/test.rb', line 21

def test
  ok = Roger::Cli::Base.project.test.run_test!(self.class.stack_index)
  fail(Thor::Error, "The test failed") unless ok
end