15 Commits

Author SHA1 Message Date
Thibault Jouan
3cb195c9a0 Update rspec to last version 2014-09-16 21:15:25 +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
23d5d8a1df Refactor spec/support/**/*.rb require calls 2014-02-10 16:46:14 +00:00
Thibault Jouan
88d5ab68b7 Remove TestsHelpers module (was used in specs) 2014-01-19 17:39:14 +00:00
Thibault Jouan
cfe9a009ae Revert "Remove deprecated rspec option"
This reverts commit 5e6f5f4861c50c4450095f271943674885476d5f.
2013-12-19 20:21:24 +00:00
Thibault Jouan
5e6f5f4861 Remove deprecated rspec option 2013-12-19 19:47:29 +00:00
Thibault Jouan
9040420360 Improve net-ssh mock connection usage in specs 2013-09-24 21:08:01 +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
Thibault Jouan
580ad66bab Use new rspec metadata arguments as symbol 2013-08-06 18:34:53 +00:00
Thibault Jouan
cff122432b Refactor Net::SSH spec helpers definition and usages 2013-08-06 17:29:45 +00:00
Thibault Jouan
5d9a5f1f57 Simplify spec helper:
Move specific exception `SomeErrorInRecipe' in the only spec where it
is used.
2013-08-06 17:13:41 +00:00
Thibault Jouan
d677c3aa97 Improve exceptions usage in specs:
* Throw symbols instead of raising exceptions to test code evaluation,
  this will reduce "bad" usages of exceptions, symbols seems a little
  better for now;
* Add a specific exception to be used in specs for testing behaviour
  when an exception is raised from a recipe.
2013-08-01 23:23:49 +00:00
Thibault Jouan
c3737e738e Refactor trap_exit spec helper usages 2013-08-01 22:51:41 +00:00
Thibault Jouan
f0d90c96e9 Add rspec fixtures helpers 2013-07-27 18:20:44 +00:00
Thibault Jouan
b380e02e30 Add test dependencies 2013-07-27 13:04:16 +00:00