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.



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

def stack_index
  @stack_index
end

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


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

def self.exit_on_failure?
  true
end

Instance Method Details

#testObject

Raises:

  • (Thor::Error)


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

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