Class: RowCountExpectation
- Inherits:
-
Expectation
- Object
- Expectation
- RowCountExpectation
- Defined in:
- lib/dbexpect/expectations/row_count_expectation.rb
Instance Method Summary collapse
- #expect_msg ⇒ Object
-
#initialize(db_name, schema, table, count) ⇒ RowCountExpectation
constructor
A new instance of RowCountExpectation.
- #where_clause ⇒ Object
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_msg ⇒ Object
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_clause ⇒ Object
24 25 26 |
# File 'lib/dbexpect/expectations/row_count_expectation.rb', line 24 def where_clause "1=1" end |