Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions spec/puppet/resource_api/transport_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ class Wibble; end
end
end

after(:each) do
Puppet::Util::NetworkDevice.instance_variable_set(:@current, nil)
end

context 'when puppet has set_device' do
it 'wraps the transport and calls set_device within NetworkDevice' do
expect(Puppet::ResourceApi::Transport::Wrapper).to receive(:new).with(device_name, transport).and_return(wrapper)
Expand Down
5 changes: 5 additions & 0 deletions spec/puppet/resource_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1767,6 +1767,11 @@ def set(_context, changes) end
allow(provider_class).to receive(:new).and_return(provider)
end

after(:each) do
# reset cached provider between tests
type.instance_variable_set(:@my_provider, nil)
end

it { expect { described_class.register_type(definition) }.not_to raise_error }

it 'is seen as a supported feature' do
Expand Down