Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ianwhite/3100746 to your computer and use it in GitHub Desktop.
Save ianwhite/3100746 to your computer and use it in GitHub Desktop.
WarrantyClaimWorkflow
describe WarrantyClaimWorkflow do
it "yields a SuccessResult" do
should_receive :succeeded
subject.handle(event_that_succeeds) do |result|
result.on_success { succeeded }
end
end
it "yields a FailureResult" do
should_not_receive :succeeded
subject.handle(event_that_fails) do |result|
result.on_success { succeeded }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment