21 Commits

Author SHA1 Message Date
Thibault Jouan
f6237bfc0c Implement `yaml_eq' condition keyword 2014-10-11 13:46:18 +00:00
Thibault Jouan
52dcfcedd3 Refactor specs 2014-09-27 12:20:24 +00:00
Thibault Jouan
2543fdeb00 Implement `file_match' condition keyword 2014-09-27 12:14:16 +00:00
Thibault Jouan
4a83e8c71a Implement `file_eq' condition keyword 2014-09-22 08:25:50 +00:00
Thibault Jouan
3c46c5bc61 Implement `test_macro' recipe keyword 2014-06-03 16:27:59 +00:00
Thibault Jouan
0485105e28 Support (key, value) form in env? condition keyword 2014-04-24 21:41:30 +00:00
Thibault Jouan
25b1394178 Improve HasEnv specs:
* Use a more classic style, and rely on a simple Hash instead of
  stubbing a double;
* Improve examples to show the intent more clearly (like the use of a
  symbol when querying).
2014-04-24 18:38:58 +00:00
Thibault Jouan
fc5d35ceb5 Fix subject name in HasExecutable specs 2014-04-24 15:52:25 +00:00
Thibault Jouan
7c6ac4c9d8 Implement `` condition keyword (shell cmd status) 2014-03-08 19:43:41 +00:00
Thibault Jouan
eeab386216 Implement `has_executable' condition keyword 2014-03-05 07:19:15 +00:00
Thibault Jouan
fcba1a5c0b Implement rspec TestEnvHelpers:
Allow use of our test environment, with a mocked remote and convenient
methods to write more concise expectations.

  #env, builds and returns a memoized test environment (with mocked
  remote)

  #output, returns env output as a string

  #remote_fs, returns env remote fs

  #expect_execution, setup a remote command execution expectation
2014-03-04 23:24:05 +00:00
Thibault Jouan
91637ca631 Refactor tests specs with shared examples 2014-02-10 17:33:48 +00:00
Thibault Jouan
48a9da9365 Fix coding standards (module nesting) in specs 2014-02-08 17:59:33 +00:00
Thibault Jouan
a0482d175c Implement `file_contains' condition keyword 2014-01-23 16:37:19 +00:00
Thibault Jouan
0b4df20f55 Implement `has_dir' condition keyword 2014-01-21 15:02:07 +00:00
Thibault Jouan
103b9d1230 Rename Remote::FS#{has_,}file? 2014-01-08 22:30:52 +00:00
Thibault Jouan
19b091a15c Rename Remote::Environment#{has_,}key? 2014-01-08 22:28:23 +00:00
Thibault Jouan
ef0307fbb5 Improve small details in specs:
* Fix coding standards;
* Simplify some expectations (eq instead of be matcher);
* Expect identity on block instead of calling;
* Change some before call as oneliners;
* Avoid shadowing variable names;
* Improve wording where needed.
2013-12-19 22:46:56 +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
2cbe1726f7 Implement `has_file' condition keyword 2013-09-26 00:28:40 +00:00
Thibault Jouan
04afc82a29 Implement `has_env' condition keyword 2013-08-20 03:03:17 +00:00