Skip to content

Commit ff485c9

Browse files
committed
Removing outdated helper function
1 parent bae7766 commit ff485c9

File tree

4 files changed

+4
-27
lines changed

4 files changed

+4
-27
lines changed

spec/acceptance/device_spec.rb

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
'ensure_param=present variant_pattern_param=0xAE321EEF url_param="https://www.google.com"'
1414
end
1515

16-
before(:all) do # rubocop:disable RSpec/BeforeAfterAll
17-
if Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('5.3.0') && Gem::Version.new(Puppet::PUPPETVERSION) < Gem::Version.new('5.4.0')
18-
# work around https://tickets.puppetlabs.com/browse/PUP-8632 and https://tickets.puppetlabs.com/browse/PUP-9047
19-
FileUtils.mkdir_p(File.expand_path('~/.puppetlabs/opt/puppet/cache/devices/the_node/state'))
20-
end
21-
end
22-
2316
describe 'using `puppet resource`' do
2417
it 'manages resources on the target system' do
2518
stdout_str, status = Open3.capture2e("puppet resource #{common_args} device_provider foo ensure=present #{default_type_values}")
@@ -103,12 +96,8 @@
10396
DEVICE_CREDS
10497
end
10598

106-
def is_device_apply_supported?
107-
Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('5.3.6') && Gem::Version.new(Puppet::PUPPETVERSION) != Gem::Version.new('5.4.0')
108-
end
109-
11099
before do
111-
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)" unless is_device_apply_supported?
100+
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)"
112101
device_conf.write(device_conf_content)
113102
device_conf.close
114103

spec/acceptance/multi_device_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,8 @@
2727
DEVICE_CONF
2828
end
2929

30-
def is_device_apply_supported?
31-
Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('5.3.6') && Gem::Version.new(Puppet::PUPPETVERSION) != Gem::Version.new('5.4.0')
32-
end
33-
3430
before do
35-
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)" unless is_device_apply_supported?
31+
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)"
3632
device_conf.write(device_conf_content)
3733
device_conf.close
3834
end

spec/acceptance/transport/transport_defaults_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@
2323
end
2424
let(:device_credentials) { Tempfile.new('credentials.txt') }
2525

26-
def is_device_apply_supported?
27-
Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('5.3.6') && Gem::Version.new(Puppet::PUPPETVERSION) != Gem::Version.new('5.4.0')
28-
end
29-
3026
before do
31-
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)" unless is_device_apply_supported?
27+
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)"
3228
device_conf.write(device_conf_content)
3329
device_conf.close
3430

spec/acceptance/transport/transport_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@
2323
end
2424
let(:device_credentials) { Tempfile.new('credentials.txt') }
2525

26-
def is_device_apply_supported?
27-
Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('5.3.6') && Gem::Version.new(Puppet::PUPPETVERSION) != Gem::Version.new('5.4.0')
28-
end
29-
3026
before do
31-
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)" unless is_device_apply_supported?
27+
skip "No device --apply in puppet before v5.3.6 nor in v5.4.0 (v#{Puppet::PUPPETVERSION} is installed)"
3228
device_conf.write(device_conf_content)
3329
device_conf.close
3430

0 commit comments

Comments
 (0)