Class: RowExpectation

Inherits:
Expectation show all
Defined in:
lib/dbexpect/expectations/row_expectation.rb

Instance Method Summary collapse

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_msgObject



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_clauseObject



25
26
27
# File 'lib/dbexpect/expectations/row_expectation.rb', line 25

def where_clause
  @row.where_clause
end