Class: Simmer::Specification::Assert::Assertions::BadTableAssertion
- Inherits:
-
Object
- Object
- Simmer::Specification::Assert::Assertions::BadTableAssertion
- Defined in:
- lib/simmer/specification/assert/assertions/bad_table_assertion.rb
Overview
Describes when a database table does not meet expectations.
Instance Attribute Summary collapse
-
#actual_record_set ⇒ Object
readonly
Returns the value of attribute actual_record_set.
-
#expected_record_set ⇒ Object
readonly
Returns the value of attribute expected_record_set.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, expected_record_set, actual_record_set) ⇒ BadTableAssertion
constructor
A new instance of BadTableAssertion.
- #to_h ⇒ Object
Constructor Details
#initialize(name, expected_record_set, actual_record_set) ⇒ BadTableAssertion
Returns a new instance of BadTableAssertion.
18 19 20 21 22 23 24 |
# File 'lib/simmer/specification/assert/assertions/bad_table_assertion.rb', line 18 def initialize(name, expected_record_set, actual_record_set) @name = name @expected_record_set = expected_record_set @actual_record_set = actual_record_set freeze end |
Instance Attribute Details
#actual_record_set ⇒ Object (readonly)
Returns the value of attribute actual_record_set.
16 17 18 |
# File 'lib/simmer/specification/assert/assertions/bad_table_assertion.rb', line 16 def actual_record_set @actual_record_set end |
#expected_record_set ⇒ Object (readonly)
Returns the value of attribute expected_record_set.
16 17 18 |
# File 'lib/simmer/specification/assert/assertions/bad_table_assertion.rb', line 16 def expected_record_set @expected_record_set end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/simmer/specification/assert/assertions/bad_table_assertion.rb', line 16 def name @name end |
Instance Method Details
#to_h ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/simmer/specification/assert/assertions/bad_table_assertion.rb', line 26 def to_h { 'type' => 'table', 'name' => name, 'expected_record_set' => expected_record_set.to_h, 'actual_record_set' => actual_record_set.to_h } end |