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
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
#beaker-rspec
1
+
#beaker-rspec
2
2
3
3
beaker-rspec is a bridge between the puppet acceptance test harness ([beaker](https://github.com/puppetlabs/beaker)) and [rspec](https://github.com/rspec/rspec). It also integrates [serverspec](http://serverspec.org/).
4
4
5
-
#Upgrading from beaker-rspec 5 to 6
5
+
#Upgrading from beaker-rspec 5 to 6
6
6
7
7
In beaker-rspec 6, we've picked up the newest beaker, 3.y. In this release, we've
8
8
given up support for Ruby 1.9 and moved to 2.2.5 as our lowest tested version,
@@ -13,7 +13,7 @@ To learn more about those changes, please checkout our
13
13
doc. Note that besides the Ruby version & beaker dependency change, nothing else
14
14
was changed in beaker-rspec itself.
15
15
16
-
#Typical Workflow
16
+
#Typical Workflow
17
17
18
18
Beaker does setup and provision all nodes from your nodeset on each test run, and cleans up the VMs after use. During development on a module it can be very handy to keep the VMs available for inspection or reuse. Set `BEAKER_destroy=no` do skip the cleanup and `BEAKER_provision=no` once the VMs are created.
19
19
@@ -31,7 +31,7 @@ Beaker does setup and provision all nodes from your nodeset on each test run, an
31
31
32
32
cd .vagrant/beaker_vagrant_files/default.yml ; vagrant destroy --force
33
33
34
-
##Supported ENV variables
34
+
##Supported ENV variables
35
35
36
36
*`BEAKER_color`: set to `no` to disable color output
37
37
*`BEAKER_debug`: set to any value to enable beaker debug logging
@@ -43,16 +43,16 @@ Beaker does setup and provision all nodes from your nodeset on each test run, an
43
43
44
44
For details on the specific mappings, the [setup code](https://github.com/puppetlabs/beaker-rspec/blob/2771b4b1864692690254a969680a57ff22ac0516/lib/beaker-rspec/spec_helper.rb#L26-L32) and the [beaker docs](https://github.com/puppetlabs/beaker/blob/master/docs/tutorials/the_command_line.md).
45
45
46
-
#Building your Module Testing Environment
46
+
#Building your Module Testing Environment
47
47
48
48
Using puppetlabs-mysql as an example module.
49
49
50
-
##Clone the module repository of the module where you want to add tests
50
+
##Clone the module repository of the module where you want to add tests
In module's top level directory edit the Gemfile. You should see a `:system_tests`
58
58
or `:acceptance` group there, but if not, add beaker-rspec there:
@@ -67,7 +67,7 @@ Then run
67
67
68
68
bundle install
69
69
70
-
##Create node files
70
+
##Create node files
71
71
72
72
These files indicate the nodes (or hosts) that the tests will be run on. By default, any node file called `default.yml` will be used. You can override this using the `BEAKER_set` environment variable to indicate an alternate file. Do not provide full path or the '.yml' file extension to `BEAKER_set`, it is assumed to be located in 'spec/acceptance/nodesets/${NAME}.yml' by beaker-rspec. If you wish to use a completely different file location use `BEAKER_setfile` and set it to the full path (including file extension) of your hosts file.
73
73
@@ -83,7 +83,7 @@ Create the nodesets directory. From module's top level directory:
83
83
84
84
Copy any nodesets that you wish to use into the nodesets directory.
85
85
86
-
##Create the spec_helper_acceptance.rb
86
+
##Create the spec_helper_acceptance.rb
87
87
88
88
In the `spec` folder, you should see the project's `spec_helper_acceptance.rb`.
89
89
This file contains all of the setup logic needed to get your Systems Under Test
@@ -133,7 +133,7 @@ This method will install the latest puppet-agent from the specified
133
133
134
134
Update spec_helper_acceptance.rb to reflect the module under test. You will need to set the correct module name and add any module dependencies. Place the file in the `spec` directory (in this case `puppetlabs-mysql/spec`)
135
135
136
-
##Create spec tests for your module
136
+
##Create spec tests for your module
137
137
138
138
Spec tests are written in [RSpec](http://rspec.info). You can also use [serverspec](http://serverspec.org/) matchers to test [resources](http://serverspec.org/resource_types.html).
139
139
@@ -178,7 +178,7 @@ describe 'mysql::server::account_security class' do
0 commit comments