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:
Thibault Jouan
2013-08-01 17:15:11 +00:00
parent 836f9ffc29
commit c4fc9828db
10 changed files with 56 additions and 17 deletions

View File

@@ -10,3 +10,17 @@ Feature: tasks
When I execute the recipe
Then the exit status must be 0
And the output must contain "hello from recipe"
Scenario: reports errors for invalid action calls in a task
Given a recipe with:
"""
task 'some_task' do
invalid_action
end
"""
When I execute the recipe
Then the exit status must be 70
And the output must match:
"""
\Arecipe.rb:2:.+invalid task action `invalid_action'
"""