Class: RowExpectation
- Inherits:
-
Expectation
- Object
- Expectation
- RowExpectation
- Defined in:
- lib/dbexpect/expectations/row_expectation.rb
Instance Method Summary collapse
- #expect_msg ⇒ Object
-
#initialize(db_name, schema, table, row_data) ⇒ RowExpectation
constructor
A new instance of RowExpectation.
- #where_clause ⇒ Object
Methods inherited from Expectation
#failed_validation?, #failure_message, #validate_expectation
Constructor Details
#initialize(db_name, schema, table, row_data) ⇒ RowExpectation
Returns a new instance of RowExpectation.
19 20 21 22 23 |
# File 'lib/dbexpect/expectations/row_expectation.rb', line 19 def initialize(db_name,schema,table,row_data) @row = row_data @count = 1 super(db_name,schema,table) end |
Instance Method Details
#expect_msg ⇒ Object
29 30 31 |
# File 'lib/dbexpect/expectations/row_expectation.rb', line 29 def expect_msg "Expected #{@schema}.#{@table} to contain a row where #{where_clause}, " end |
#where_clause ⇒ Object
25 26 27 |
# File 'lib/dbexpect/expectations/row_expectation.rb', line 25 def where_clause @row.where_clause end |