Sha256: e5f8904d65e05fae3bfbbc13b0dfcf113051fd5307f6bc052937f8dde47e6474

Contents?: true

Size: 580 Bytes

Versions: 3

Compression:

Stored size: 580 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Rbm do
  describe '.log_at_exit_error' do
    let(:crash_log) { 'rubymisc.crash.log' }

    around(:each) { FileUtils.rm crash_log, force: true, verbose: true }

    it { should respond_to :log_at_exit_error }

    specify 'fail SystemExit, raised by exit to initiate the termination of the script' do
      File.exist?(crash_log).should be_false

      begin
        fail SystemExit
      rescue Exception
        Rbm.send(:dump_error_to_file, crash_log)
      end

      File.exist?(crash_log).should be_true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubymisc-0.2.0 spec/rubymisc_spec.rb
rubymisc-0.1.0 spec/rubymisc_spec.rb
rubymisc-0.0.4 spec/rubymisc_spec.rb