File: exceptions_spec.rb

package info (click to toggle)
ruby-daemons 1.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 388 kB
  • sloc: ruby: 2,133; makefile: 7
file content (35 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'spec_helper'

module Daemons
  describe Exception do
    it { is_expected.to be_a RuntimeError }
  end

  describe RuntimeException do
    it { is_expected.to be_a Exception }
  end

  describe CmdException do
    it { is_expected.to be_a Exception }
  end

  describe Error do
    it { is_expected.to be_a Exception }
  end

  describe TimeoutError do
    it { is_expected.to be_a Error }
  end

  describe SystemError do
    subject { described_class.new message, system_error }
    let(:message) { "sample message" }
    let(:system_error) { "sample system error" }

    it { is_expected.to be_a Error }

    describe '#system_error' do
      it { expect(subject.system_error).to eq system_error }
    end
  end
end