Class: Simmer::Specification::Assert::Assertions::BadOutputAssertion

Inherits:
Object
  • Object
show all
Defined in:
lib/simmer/specification/assert/assertions/bad_output_assertion.rb

Overview

Describes when the output does not meet expectations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expected_value) ⇒ BadOutputAssertion

Returns a new instance of BadOutputAssertion.



18
19
20
21
22
# File 'lib/simmer/specification/assert/assertions/bad_output_assertion.rb', line 18

def initialize(expected_value)
  @expected_value = expected_value

  freeze
end

Instance Attribute Details

#expected_valueObject (readonly)

Returns the value of attribute expected_value.



16
17
18
# File 'lib/simmer/specification/assert/assertions/bad_output_assertion.rb', line 16

def expected_value
  @expected_value
end

Instance Method Details

#to_hObject



24
25
26
27
28
29
# File 'lib/simmer/specification/assert/assertions/bad_output_assertion.rb', line 24

def to_h
  {
    'type' => 'output',
    'expected_value' => expected_value
  }
end