Skip to content

Commit eb9d229

Browse files
committed
README.md: fix example, drop Ruby 1.8 examples
1 parent 29f9bc7 commit eb9d229

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

README.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you're using Bundler to manage gems in your module repository, install `rspec
2222
1. Add the following line to your `Gemfile`:
2323

2424
```ruby
25-
gem 'rspec-puppet-facts', :require => false
25+
gem 'rspec-puppet-facts', require: false
2626
```
2727

2828
2. Run `bundle install`.
@@ -54,38 +54,18 @@ By default, `rspec-puppet-facts` provides the facts only for `x86_64` architectu
5454
* `'operatingsystem'` - The name of the operating system, as a string.
5555
* `'operatingsystemrelease'` - An array of version numbers, as strings.
5656

57-
This is particularly useful if your module is split into operating system subclasses. For example, if you had a class called `myclass::debian` that you wanted to test against Debian 6 and Debian 7 on both `x86_64` _and_ `i386` architectures, you could write the following test:
57+
This is particularly useful if your module is split into operating system subclasses. For example, if you had a class called `myclass::debian` that you wanted to test against Debian 12 and Debian 11 on both `x86_64` _and_ `i386` architectures, you could write the following test:
5858

5959
```ruby
6060
require 'spec_helper'
6161

62-
describe 'myclass::debian' do
63-
test_on = {
64-
:hardwaremodels => ['x86_64', 'i386'],
65-
:supported_os => [
66-
{
67-
'operatingsystem' => 'Debian',
68-
'operatingsystemrelease' => ['6', '7'],
69-
},
70-
],
71-
}
72-
73-
on_supported_os(test_on).each do |os, os_facts|
74-
let (:facts) { os_facts }
75-
it { is_expected.to compile.with_all_deps }
76-
end
77-
end
78-
```
79-
Ruby 1.9 and later:
80-
```ruby
81-
require 'spec_helper'
82-
8362
describe 'myclass::raspbian' do
8463
test_on = {
64+
hardwaremodels: ['x86_64', 'i386'],
8565
supported_os: [
8666
{
8767
'operatingsystem' => 'Debian',
88-
'operatingsystemrelease' => ['10', '9', '8'],
68+
'operatingsystemrelease' => ['12', '11'],
8969
},
9070
],
9171
}

0 commit comments

Comments
 (0)