Created
November 30, 2012 23:08
-
-
Save domcleal/4179351 to your computer and use it in GitHub Desktop.
#17877 reproducer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/unit/transaction/resource_harness_spec.rb b/spec/unit/transaction/resource_harness_spec.rb | |
index 7e9aac4..6334d77 100755 | |
--- a/spec/unit/transaction/resource_harness_spec.rb | |
+++ b/spec/unit/transaction/resource_harness_spec.rb | |
@@ -111,17 +111,25 @@ describe Puppet::Transaction::ResourceHarness do | |
describe "when an error occurs" do | |
before :each do | |
stub_provider = make_stub_provider | |
- resource = stub_provider.new :name => 'name', :foo => 1, :bar => 2 | |
- resource.expects(:err).never | |
- @status = @harness.evaluate(resource) | |
+ @resource = stub_provider.new :name => 'name', :foo => 1, :bar => 2 | |
+ @resource.expects(:err).never | |
end | |
it "should record previous successful events" do | |
+ @status = @harness.evaluate(@resource) | |
@status.events[0].property.should == 'foo' | |
@status.events[0].status.should == 'success' | |
end | |
it "should record a failure event" do | |
+ @status = @harness.evaluate(@resource) | |
+ @status.events[1].property.should == 'bar' | |
+ @status.events[1].status.should == 'failure' | |
+ end | |
+ | |
+ it "should record a failure event with RSpec failure during sync" do | |
+ ZeroDivisionError.expects(:new).never() | |
+ @status = @harness.evaluate(@resource) | |
@status.events[1].property.should == 'bar' | |
@status.events[1].status.should == 'failure' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment