3 provider_class = Puppet::Type.type(:rabbitmq_plugin).provider(:rabbitmqplugins)
4 describe provider_class do
6 Puppet::Type::Rabbitmq_plugin.new(
10 let(:provider) { provider_class.new(resource) }
12 it 'matches plugins' do
13 provider.expects(:rabbitmqplugins).with('list', '-E', '-m').returns("foo\n")
14 expect(provider.exists?).to eq(true)
16 it 'calls rabbitmqplugins to enable' do
17 provider.expects(:rabbitmqplugins).with('enable', 'foo')
20 it 'calls rabbitmqplugins to disable' do
21 provider.expects(:rabbitmqplugins).with('disable', 'foo')