blob: 1ee241666f802f4f5196a77ce70f38f8e3fb91e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
shared_examples_for "a StoreConfigs terminus" do
before :each do
Puppet[:storeconfigs] = true
Puppet[:storeconfigs_backend] = "store_configs_testing"
end
api = [:find, :search, :save, :destroy, :head]
api.each do |name|
it { should respond_to name }
end
it "should fail if an invalid backend is configured" do
Puppet[:storeconfigs_backend] = "synergy"
expect { subject }.to raise_error ArgumentError, /could not find terminus synergy/i
end
it "should wrap the declared backend" do
subject.target.class.name.should == :store_configs_testing
end
end
|