Skip to content

Commit 22dc826

Browse files
committed
Integrate tests with should_not gem
1 parent 518286e commit 22dc826

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

TESTING.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
Testing
22
=======
33

4-
## Requirements
4+
## Required Gems
55

6+
* `yard`
67
* `vagrant`
78
* `foodcritic`
89
* `rubocop`
910
* `berkshelf`
11+
* `should_not`
1012
* `chefspec`
1113
* `test-kitchen`
1214
* `kitchen-vagrant`
1315

16+
### Required Gems for Guard
17+
18+
* `guard`
19+
* `guard-foodcritic`
20+
* `guard-rubocop`
21+
* `guard-rspec`
22+
* `guard-kitchen`
23+
24+
More info at [Guard Readme](https://github.com/guard/guard#readme).
25+
26+
## Installing the Requirements
27+
1428
You must have [VirtualBox](https://www.virtualbox.org/) and [Vagrant](http://www.vagrantup.com/) installed.
1529

1630
You can install gem dependencies with bundler:
1731

1832
$ gem install bundler
19-
$ bundle install
33+
$ bundle install --without travis
34+
35+
## Generating the Documentation
36+
37+
$ bundle exec rake doc
2038

2139
## Running the Syntax Style Tests
2240

@@ -28,7 +46,7 @@ You can install gem dependencies with bundler:
2846

2947
## Running the Integration Tests
3048

31-
$ bundle exec rake integration
49+
$ bundle exec rake integration:vagrant
3250

3351
Or:
3452

@@ -38,9 +56,8 @@ Or:
3856

3957
### Running Integration Tests in the Cloud
4058

41-
#### Requirements:
59+
#### Requirements
4260

43-
* `kitchen-vagrant`
4461
* `kitchen-digitalocean`
4562
* `kitchen-ec2`
4663

@@ -50,13 +67,10 @@ You can run the tests in the cloud instead of using vagrant. First, you must set
5067
* `AWS_SECRET_ACCESS_KEY`
5168
* `AWS_KEYPAIR_NAME`: EC2 SSH public key name. This is the name used in Amazon EC2 Console's Key Pars section.
5269
* `EC2_SSH_KEY_PATH`: EC2 SSH private key local full path. Only when you are not using an SSH Agent.
53-
* `DIGITALOCEAN_CLIENT_ID`
54-
* `DIGITALOCEAN_API_KEY`
70+
* `DIGITALOCEAN_ACCESS_TOKEN`
5571
* `DIGITALOCEAN_SSH_KEY_IDS`: DigitalOcean SSH numeric key IDs.
5672
* `DIGITALOCEAN_SSH_KEY_PATH`: DigitalOcean SSH private key local full path. Only when you are not using an SSH Agent.
5773

58-
Then, you must configure test-kitchen to use `.kitchen.cloud.yml` configuration file:
74+
Then use the `integration:cloud` rake task to run the tests:
5975

60-
$ export KITCHEN_LOCAL_YAML=".kitchen.cloud.yml"
61-
$ bundle exec kitchen list
62-
[...]
76+
$ bundle exec rake integration:cloud

test/unit/spec_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
require 'chefspec'
2323
require 'chefspec/berkshelf'
24+
require 'should_not/rspec'
25+
2426
require_relative 'support/stubs'
2527

2628
RSpec.configure do |config|

0 commit comments

Comments
 (0)