puppet-ceilometer/spec/shared_examples.rb
Yanis Guenane 9ec5122f6d Implement rspec function it_raises
On some puppet modules, a it_raises helper is provided. This commit
implements it for puppet-ceilometer.

Change-Id: Ie1c83e09952fed1f114fc07d9944f89e94c413f1
2014-05-15 14:42:34 -04:00

6 lines
205 B
Ruby

shared_examples_for "a Puppet::Error" do |description|
it "with message matching #{description.inspect}" do
expect { should have_class_count(1) }.to raise_error(Puppet::Error, description)
end
end