Skip to content

Commit 7882cee

Browse files
committed
Update @opts -> @options in mock
1 parent d59d12e commit 7882cee

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

spec/octocatalog-diff/tests/catalog/computed_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,14 @@
326326
context 'and environment is specified' do
327327
it 'should return without raising error when directory exists' do
328328
described_object = described_class.allocate
329-
described_object.instance_variable_set('@opts', preserve_environments: true, environment: 'yup')
329+
described_object.instance_variable_set('@options', preserve_environments: true, environment: 'yup')
330330
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
331331
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.not_to raise_error
332332
end
333333

334334
it 'should raise Errno::ENOENT when directory does not exist' do
335335
described_object = described_class.allocate
336-
described_object.instance_variable_set('@opts', preserve_environments: true, environment: 'nope')
336+
described_object.instance_variable_set('@options', preserve_environments: true, environment: 'nope')
337337
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
338338
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.to raise_error(Errno::ENOENT)
339339
end
@@ -343,15 +343,15 @@
343343
it 'should return without raising error when directory exists' do
344344
allow(File).to receive(:"directory?").with('/tmp/assert/environments/production').and_return(true)
345345
described_object = described_class.allocate
346-
described_object.instance_variable_set('@opts', preserve_environments: true)
346+
described_object.instance_variable_set('@options', preserve_environments: true)
347347
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
348348
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.not_to raise_error
349349
end
350350

351351
it 'should raise Errno::ENOENT when directory does not exist' do
352352
allow(File).to receive(:"directory?").with('/tmp/assert/environments/production').and_return(false)
353353
described_object = described_class.allocate
354-
described_object.instance_variable_set('@opts', preserve_environments: true, environment: 'nope')
354+
described_object.instance_variable_set('@options', preserve_environments: true, environment: 'nope')
355355
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
356356
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.to raise_error(Errno::ENOENT)
357357
end
@@ -364,7 +364,7 @@
364364
allow(File).to receive(:"directory?").with('/tmp/assert/environments/production').and_return(false)
365365
allow(File).to receive(:"directory?").with('/tmp/assert/environments/custom').and_return(true)
366366
described_object = described_class.allocate
367-
described_object.instance_variable_set('@opts', environment: 'custom')
367+
described_object.instance_variable_set('@options', environment: 'custom')
368368
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
369369
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.not_to raise_error
370370
end
@@ -373,7 +373,7 @@
373373
allow(File).to receive(:"directory?").with('/tmp/assert/environments/production').and_return(true)
374374
allow(File).to receive(:"directory?").with('/tmp/assert/environments/custom').and_return(false)
375375
described_object = described_class.allocate
376-
described_object.instance_variable_set('@opts', environment: 'custom')
376+
described_object.instance_variable_set('@options', environment: 'custom')
377377
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
378378
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.to raise_error(Errno::ENOENT)
379379
end
@@ -383,15 +383,15 @@
383383
it 'should return without raising error when directory exists' do
384384
allow(File).to receive(:"directory?").with('/tmp/assert/environments/production').and_return(true)
385385
described_object = described_class.allocate
386-
described_object.instance_variable_set('@opts', {})
386+
described_object.instance_variable_set('@options', {})
387387
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
388388
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.not_to raise_error
389389
end
390390

391391
it 'should raise Errno::ENOENT when directory does not exist' do
392392
allow(File).to receive(:"directory?").with('/tmp/assert/environments/production').and_return(false)
393393
described_object = described_class.allocate
394-
described_object.instance_variable_set('@opts', {})
394+
described_object.instance_variable_set('@options', {})
395395
described_object.instance_variable_set('@builddir', OpenStruct.new(tempdir: '/tmp/assert'))
396396
expect { described_object.send(:assert_that_puppet_environment_directory_exists) }.to raise_error(Errno::ENOENT)
397397
end

0 commit comments

Comments
 (0)