Class: RowCountExpectation

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

Instance Method Summary collapse

Methods inherited from Expectation

#failed_validation?, #failure_message, #validate_expectation

Constructor Details

#initialize(db_name, schema, table, count) ⇒ RowCountExpectation

Returns a new instance of RowCountExpectation.



19
20
21
22
# File 'lib/dbexpect/expectations/row_count_expectation.rb', line 19

def initialize(db_name,schema,table,count)
  @count = count
  super(db_name,schema,table)
end

Instance Method Details

#expect_msgObject



28
29
30
# File 'lib/dbexpect/expectations/row_count_expectation.rb', line 28

def expect_msg
  "Expected #{@schema}.#{@table} to contain #{@count} rows, "
end

#where_clauseObject



24
25
26
# File 'lib/dbexpect/expectations/row_count_expectation.rb', line 24

def where_clause
  "1=1"
end