Class: OnlyofficeTestrailWrapper::RspecExampleMock

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb

Overview

Mock Rspec example

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description: 'MockDescription', exception: RspecExceptionMock.new) ⇒ RspecExampleMock

Returns a new instance of RspecExampleMock.



36
37
38
39
40
41
42
43
# File 'lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb', line 36

def initialize(description: 'MockDescription',
               exception: RspecExceptionMock.new)
  @exception = exception
  @metadata = { execution_result: RspecExceptionResultMock.new, absolute_file_path: __FILE__ }
  @pending = false
  @description = description
  @section = ''
end

Instance Attribute Details

#backtraceObject

Returns backtrace object.

Returns:

  • (Object)

    backtrace object



28
29
30
# File 'lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb', line 28

def backtrace
  @backtrace
end

#descriptionString

Returns description of spec.

Returns:

  • (String)

    description of spec



34
35
36
# File 'lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb', line 34

def description
  @description
end

#exceptionObject

Returns object exception.

Returns:

  • (Object)

    object exception



26
27
28
# File 'lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb', line 26

def exception
  @exception
end

#metadataHash

Returns metadata.

Returns:

  • (Hash)

    metadata



30
31
32
# File 'lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb', line 30

def 
  @metadata
end

#pendingTrue, False

Returns is test pending.

Returns:

  • (True, False)

    is test pending



32
33
34
# File 'lib/onlyoffice_testrail_wrapper/mock/rspec_example_mock.rb', line 32

def pending
  @pending
end