File: a_test.rb

package info (click to toggle)
ruby-rspec-instafail 1.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 160 kB
  • sloc: ruby: 242; makefile: 2
file content (35 lines) | stat: -rwxr-xr-x 648 bytes parent folder | download | duplicates (4)
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 File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rspec', 'instafail'))

describe 'x' do
  it 'fails logically' do
    1.should == 2
  end

  it 'b' do
  end

  it 'c' do
  end

  it 'pends' do
    pending
    raise
  end

  it 'raises a simple error' do
    raise 'shallow failure'
  end

  it 'raises a hidden error' do
    error = ExceptionWrappingException.new('There is an error in this error.')
    error.original_exception = RuntimeError.new('There is no error in this error.')
    raise error
  end

  it 'e' do
  end
end

class ExceptionWrappingException < RuntimeError
  attr_accessor :original_exception
end