Sha256: ee3d4007150d34a2b5121b06e3f2a523a841758e10f43bf2ea5142bd330d457f
Contents?: true
Size: 581 Bytes
Versions: 3
Compression:
Stored size: 581 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Actions::HandleError do context '#initialize' do it 'requires an exception' do expect { Actions::HandleError.new(StandardError.new) }.not_to raise_error end end context '#run' do it 'handles errors' do action = Actions::HandleError.new(RuntimeError.new) silence(:stderr) do begin action.run rescue SystemExit => e @err = e end end expect(@err).to be_kind_of(SystemExit) expect(@err.status).to be(99) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
local_pac-0.6.3 | spec/actions/handle_error_spec.rb |
local_pac-0.6.2 | spec/actions/handle_error_spec.rb |
local_pac-0.6.1 | spec/actions/handle_error_spec.rb |