Class: Neiltest::TestCase::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/neiltest/test_case.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backtraceObject

Returns the value of attribute backtrace

Returns:

  • (Object)

    the current value of backtrace



5
6
7
# File 'lib/neiltest/test_case.rb', line 5

def backtrace
  @backtrace
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



5
6
7
# File 'lib/neiltest/test_case.rb', line 5

def message
  @message
end

Returns the value of attribute print_backtrace

Returns:

  • (Object)

    the current value of print_backtrace



5
6
7
# File 'lib/neiltest/test_case.rb', line 5

def print_backtrace
  @print_backtrace
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



5
6
7
# File 'lib/neiltest/test_case.rb', line 5

def type
  @type
end

Instance Method Details

#fail?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/neiltest/test_case.rb', line 10

def fail?
  type == :fail
end

#method_nameObject



6
7
8
# File 'lib/neiltest/test_case.rb', line 6

def method_name
  backtrace[0].split(":in `")[1].split("'")[0]
end

Returns:

  • (Boolean)


14
15
16
# File 'lib/neiltest/test_case.rb', line 14

def print_backtrace?
  print_backtrace
end