Implement condition DSL negated test prefix (no_*)

* Allow no_* to be used for every tests in condition DSL:
  condition { no_has_env :shell, '/bin/sh' };
* Modify Test constructor to accept negated: named argument, implement
  #negated? and #pass?;
* Rename #success? to #verify in all test classes.
This commit is contained in:
Thibault Jouan
2013-10-01 00:19:30 +00:00
parent cfe9a009ae
commit 35621e1f5f
11 changed files with 136 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ module Producer
def met?
return !!@return_value if @tests.empty?
@tests.each { |t| return false unless t.success? }
@tests.each { |t| return false unless t.pass? }
true
end