Build conditions with DSL evaluated tests:
In Condition: * Modify constructor to accepts tests and a default return value; * Implement #met?; * Modify #! so that it return the negated value returned by #met?. In Condition::DSL: * Modify .evaluate to build the condition with tests and the value returned by a the evaluated condition block. Add a basic Test base class, with env and arguments as attributes. Add some spec helpers to build some easily testable kind of Test instances (as test doubles).
This commit is contained in:
9
spec/support/tests_helpers.rb
Normal file
9
spec/support/tests_helpers.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module TestsHelpers
|
||||
def test_ok
|
||||
double('test', success?: true)
|
||||
end
|
||||
|
||||
def test_ko
|
||||
double('test', success?: false)
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user