|
23 | 23 | end |
24 | 24 |
|
25 | 25 | it 'has a version number' do |
26 | | - expect(Puppet::ResourceApi::VERSION).not_to be nil |
| 26 | + expect(described_class::VERSION).not_to be nil |
27 | 27 | end |
28 | 28 |
|
29 | 29 | context 'when registering a minimal type' do |
@@ -1482,7 +1482,7 @@ class OtherDevice; end |
1482 | 1482 |
|
1483 | 1483 | before do |
1484 | 1484 | allow(Puppet::Util::NetworkDevice).to receive(:current).with(no_args).and_return(transport) |
1485 | | - allow(transport).to receive(:is_a?).with(Puppet::ResourceApi::Transport::Wrapper).and_return(true) |
| 1485 | + allow(transport).to receive(:is_a?).with(described_class::Transport::Wrapper).and_return(true) |
1486 | 1486 | allow(transport).to receive(:schema).and_return(schema_def) |
1487 | 1487 | allow(schema_def).to receive(:name).and_return(schema_name) |
1488 | 1488 |
|
@@ -1654,7 +1654,7 @@ def set(_context, changes) |
1654 | 1654 | type.rsapi_provider_get_cache.clear |
1655 | 1655 |
|
1656 | 1656 | allow(type.my_provider).to receive(:get) |
1657 | | - .with(kind_of(Puppet::ResourceApi::BaseContext)) |
| 1657 | + .with(kind_of(described_class::BaseContext)) |
1658 | 1658 | .and_return([{ name: 'somename', test_string: 'canonfoo' }, |
1659 | 1659 | { name: 'other', test_string: 'canonbar' }]) |
1660 | 1660 | end |
@@ -1839,7 +1839,7 @@ def set(_context, changes) |
1839 | 1839 |
|
1840 | 1840 | before do |
1841 | 1841 | allow(type.my_provider).to receive(:get) |
1842 | | - .with(kind_of(Puppet::ResourceApi::BaseContext)) |
| 1842 | + .with(kind_of(described_class::BaseContext)) |
1843 | 1843 | .and_return([{ name: 'somename', test_string: 'foo' }, |
1844 | 1844 | { name: 'other', test_string: 'bar' }]) |
1845 | 1845 | type.rsapi_provider_get_cache.clear |
@@ -2113,7 +2113,7 @@ class Wibble; end |
2113 | 2113 | context 'when a transport is returned by NetworkDevice.current' do |
2114 | 2114 | it 'stores the provider with the the name of the transport' do |
2115 | 2115 | allow(Puppet::Util::NetworkDevice).to receive(:current).and_return(wrapper) |
2116 | | - allow(wrapper).to receive(:is_a?).with(Puppet::ResourceApi::Transport::Wrapper).and_return(true) |
| 2116 | + allow(wrapper).to receive(:is_a?).with(described_class::Transport::Wrapper).and_return(true) |
2117 | 2117 | allow(wrapper).to receive(:transport).and_return(transport) |
2118 | 2118 | allow(transport).to receive(:class).and_return(Puppet::Transport::Wibble) |
2119 | 2119 |
|
@@ -2361,7 +2361,7 @@ def set(_context, changes) end |
2361 | 2361 | end |
2362 | 2362 |
|
2363 | 2363 | it 'calls Puppet::ResourceApi::Transport.register' do |
2364 | | - expect(Puppet::ResourceApi::Transport).to receive(:register).with(schema) |
| 2364 | + expect(described_class::Transport).to receive(:register).with(schema) |
2365 | 2365 | described_class.register_transport(schema) |
2366 | 2366 | end |
2367 | 2367 | end |
|
0 commit comments