Class: PseudoExampleFailed
- Inherits:
-
PseudoExample
- Object
- PseudoExample
- PseudoExampleFailed
- Defined in:
- lib/onlyoffice_tcm_helper/models/pseudo_example_failed.rb
Overview
class is describe object like RSpec::Core::Example with error in expected code
Instance Attribute Summary
Attributes inherited from PseudoExample
#description, #execution_result
Instance Method Summary collapse
-
#exception ⇒ Object
Exception data.
-
#initialize(description = 'Check something', exception_with_failed_lines: false) ⇒ PseudoExampleFailed
constructor
A new instance of PseudoExampleFailed.
-
#metadata ⇒ Hash
Metadata of class.
Methods inherited from PseudoExample
Constructor Details
#initialize(description = 'Check something', exception_with_failed_lines: false) ⇒ PseudoExampleFailed
Returns a new instance of PseudoExampleFailed.
7 8 9 10 11 |
# File 'lib/onlyoffice_tcm_helper/models/pseudo_example_failed.rb', line 7 def initialize(description = 'Check something', exception_with_failed_lines: false) @exception_with_failed_lines = exception_with_failed_lines super(description) end |
Instance Method Details
#exception ⇒ Object
Returns exception data.
23 24 25 26 27 28 |
# File 'lib/onlyoffice_tcm_helper/models/pseudo_example_failed.rb', line 23 def exception return MockFailedException.new if @exception_with_failed_lines 'expected: falsey value got: true' end |
#metadata ⇒ Hash
Returns metadata of class.
14 15 16 17 18 19 20 |
# File 'lib/onlyoffice_tcm_helper/models/pseudo_example_failed.rb', line 14 def { description: 'Test for create failed status result', execution_result: ExecutingResult.new, absolute_file_path: "#{Dir.pwd}/spec/onlyoffice_tcm_helper_spec.rb" } end |