Improve error reporting during recipe evaluation
* Report invalid action usages from tasks; * Implement backtrace cleaning in CLI; * Extract error class declarations in a new errors file; * Replace raise with fail keyword in task DSL class.
This commit is contained in:
@@ -12,6 +12,14 @@ module Producer::Core
|
||||
expect { dsl.evaluate(env) }
|
||||
.to raise_error(RuntimeError, 'error from task')
|
||||
end
|
||||
|
||||
context 'when given block is invalid' do
|
||||
it 'raises a TaskEvaluationError on NameError' do
|
||||
dsl = Task::DSL.new { invalid_action }
|
||||
expect { dsl.evaluate(env) }
|
||||
.to raise_error(TaskEvaluationError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#condition' do
|
||||
|
Reference in New Issue
Block a user