spec/rubymisc/exceptional_spec.rb in rubymisc-0.0.4 vs spec/rubymisc/exceptional_spec.rb in rubymisc-0.1.0
- old
+ new
@@ -1,21 +1,9 @@
# encoding: utf-8
require 'spec_helper'
describe Rbm::Exceptional do
- describe '#ASSERT' do
- specify 'catches failing block and swallows the exception' do
- failing_proc = -> { fail SecurityError.new('Fail message!') }
- expect { ASSERT &failing_proc }.not_to raise_error
- end
-
- specify 'ok block does not raise error' do
- success_proc = -> { true }
- expect { ASSERT &success_proc }.to_not raise_error
- end
- end
-
describe '#errors_with_message' do
specify 'rescue an exception if message match' do
e_socket = -> {
begin; fail 'Timeout socket'; rescue errors_with_message(/socket/); end
}