You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More info at [Guard Readme](https://github.com/guard/guard#readme).
26
-
27
4
## Installing the Requirements
28
5
29
6
You must have [VirtualBox](https://www.virtualbox.org/) and [Vagrant](http://www.vagrantup.com/) installed.
@@ -35,17 +12,40 @@ You can install gem dependencies with bundler:
35
12
36
13
## Generating the Documentation
37
14
15
+
This will generate the documentation for the source files inside the [*libraries/*](https://github.com/zuazo/ssl_certificate-cookbook/tree/master/libraries) directory.
16
+
38
17
$ bundle exec rake doc
39
18
40
-
## Running the Syntax Style Tests
19
+
The documentation is included in the source code itself.
20
+
21
+
## Syntax Style Tests
22
+
23
+
We use the following tools to test the code style:
We use [ChefSpec](https://github.com/sethvargo/chefspec#readme) and [RSpec](http://rspec.info/) for the unit tests. RSpec is generally used to test the libraries or some Ruby specific code.
35
+
36
+
The unit test files are placed in the [*test/unit/*](https://github.com/zuazo/ssl_certificate-cookbook/tree/master/test/unit) directory.
37
+
38
+
To run the tests:
45
39
46
40
$ bundle exec rake unit
47
41
48
-
## Running the Integration Tests
42
+
## Integration Tests
43
+
44
+
We use [Test Kitchen](http://kitchen.ci/) to run the tests and the tests are written using [Serverspec](http://serverspec.org/).
45
+
46
+
The integration test files are placed in the [*test/integration/*](https://github.com/zuazo/ssl_certificate-cookbook/tree/master/test/integration) directory. Some cookbooks required by this tests are in the [*test/cookbooks/*](https://github.com/zuazo/ssl_certificate-cookbook/tree/master/test/cookbooks) directory.
47
+
48
+
To run the tests:
49
49
50
50
$ bundle exec rake integration:vagrant
51
51
@@ -55,24 +55,21 @@ Or:
55
55
$ bundle exec kitchen test
56
56
[...]
57
57
58
-
### Running Integration Tests in Docker
58
+
### Integration Tests in Docker
59
59
60
-
You need to have [Docker installed](https://docs.docker.com/installation/).
60
+
You can run the integration tests using [Docker](https://www.docker.com/) instead of Vagrant if you prefer.
61
+
62
+
Of course, you need to have [Docker installed](https://docs.docker.com/engine/installation/).
61
63
62
64
$ wget -qO- https://get.docker.com/ | sh
63
65
64
66
Then use the `integration:docker` rake task to run the tests:
65
67
66
68
$ bundle exec rake integration:docker
67
69
68
-
### Running Integration Tests in the Cloud
69
-
70
-
#### Requirements
70
+
### Integration Tests in the Cloud
71
71
72
-
*`kitchen-digitalocean`
73
-
*`kitchen-ec2`
74
-
75
-
You can run the tests in the cloud instead of using vagrant. First, you must set the following environment variables:
72
+
You can run the tests in the cloud instead of using Vagrant. First, you must set the following environment variables:
76
73
77
74
*`AWS_ACCESS_KEY_ID`
78
75
*`AWS_SECRET_ACCESS_KEY`
@@ -85,3 +82,21 @@ You can run the tests in the cloud instead of using vagrant. First, you must set
85
82
Then use the `integration:cloud` rake task to run the tests:
86
83
87
84
$ bundle exec rake integration:cloud
85
+
86
+
## Guard
87
+
88
+
Guard is a tool that runs the tests automatically while you are making changes to the source files.
89
+
90
+
To run Guard:
91
+
92
+
$ guard
93
+
94
+
More info at [Guard Readme](https://github.com/guard/guard#readme).
95
+
96
+
## Available Rake Tasks
97
+
98
+
There are multiple Rake tasks that you can use to run the tests:
99
+
100
+
$ rake -T
101
+
102
+
See [Rakefile documentation](https://github.com/ruby/rake/blob/master/doc/rakefile.rdoc) for more information.
0 commit comments