7 Commits

Author SHA1 Message Date
Thibault Jouan
91637ca631 Refactor tests specs with shared examples 2014-02-10 17:33:48 +00:00
Thibault Jouan
82f8eac319 Improve Test spec:
* Use attributes readers instead of instance_eval;
* Refactor.
2014-01-20 02:00:24 +00:00
Thibault Jouan
913cba6c23 Add some new delegators in Test class:
* #remote (delegates to env.remote)
* #fs (delegates to env.remote.fs)
2014-01-18 22:53:54 +00:00
Thibault Jouan
35621e1f5f 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.
2013-12-19 20:22:44 +00:00
Thibault Jouan
b9e48a9cc4 Fix some wording issues in Test specs 2013-12-19 19:52:07 +00:00
Thibault Jouan
217b8a203a Add missing empty line in test spec 2013-10-01 19:38:17 +00:00
Thibault Jouan
ed99c191e0 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).
2013-08-18 00:29:36 +00:00